Skip to content

Commit

Permalink
Update examples, create folder for libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
vodkabears committed Jul 27, 2014
1 parent 910659d commit 87461de
Show file tree
Hide file tree
Showing 10 changed files with 21,254 additions and 6 deletions.
Empty file removed demo/img/.gitignore
Empty file.
158 changes: 158 additions & 0 deletions demo/index-zepto.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
<!DOCTYPE html>
<!--[if lt IE 7]>
<html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>
<html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>
<html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Remodal example</title>
<meta name="description" content="Remodal example">
<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" href="../src/jquery.remodal.css">
</head>
<body>
<div class="remodal-bg">
<a href="#modal">Click</a>
<br><br>

<h1>Remodal</h1>
<p>
Flat, responsive, lightweight, fast, easy customizable modal window plugin
with declarative state notation and hash tracking.
</p>
<p>
Minified version size: ~4kb
</p>
<br>

<h1>Remodal</h1>
<p>
Flat, responsive, lightweight, fast, easy customizable modal window plugin
with declarative state notation and hash tracking.
</p>
<p>
Minified version size: ~4kb
</p>
<br>
<h1>Remodal</h1>
<p>
Flat, responsive, lightweight, fast, easy customizable modal window plugin
with declarative state notation and hash tracking.
</p>
<p>
Minified version size: ~4kb
</p>
<br>
<h1>Remodal</h1>
<p>
Flat, responsive, lightweight, fast, easy customizable modal window plugin
with declarative state notation and hash tracking.
</p>
<p>
Minified version size: ~4kb
</p>
<br>
<h1>Remodal</h1>
<p>
Flat, responsive, lightweight, fast, easy customizable modal window plugin
with declarative state notation and hash tracking.
</p>
<p>
Minified version size: ~4kb
</p>
<br>
<h1>Remodal</h1>
<p>
Flat, responsive, lightweight, fast, easy customizable modal window plugin
with declarative state notation and hash tracking.
</p>
<p>
Minified version size: ~4kb
</p>
<br>
<h1>Remodal</h1>
<p>
Flat, responsive, lightweight, fast, easy customizable modal window plugin
with declarative state notation and hash tracking.
</p>
<p>
Minified version size: ~4kb
</p>
<br>
</div>

<div class="remodal" data-remodal-id="modal">
<h1>Remodal</h1>
<p>
Flat, responsive, lightweight, fast, easy customizable modal window plugin
with declarative state notation and hash tracking.
</p>
<p>
Minified version size: ~4kb
</p>
<br>
<a class="remodal-cancel" href="#">Cancel</a>
<a class="remodal-confirm" href="#">OK</a>
</div>

<div data-remodal-id="modal2">
<h1>Another one window</h1>
<p>
Hello!
</p>
<br>
<a class="remodal-confirm" href="#">Hello!</a>
</div>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/jquery-1.11.0.min.js"><\/script>')</script>

<!-- Instead of JQuery, you can use zepto now! -->
<!--<script src="js/zepto.min.js"></script>-->

<script src="../src/jquery.remodal.js"></script>

<!-- Events -->
<script>
$(document).on('open', '.remodal', function () {
console.log('open');
});

$(document).on('opened', '.remodal', function () {
console.log('opened');
});

$(document).on('close', '.remodal', function () {
console.log('close');
});

$(document).on('closed', '.remodal', function () {
console.log('closed');
});

$(document).on('confirm', '.remodal', function () {
console.log('confirm');
});

$(document).on('cancel', '.remodal', function () {
console.log('cancel');
});

// You can open or close it like this:
// $(function () {
// // var inst = $.remodal.lookup[$('[data-remodal-id=modal]').data('remodal')];
// // inst.open();
// // inst.close();
// });

// Or init in this way:
var inst = $('[data-remodal-id=modal2]').remodal();
// inst.open();
</script>
</body>
</html>
4 changes: 0 additions & 4 deletions demo/js/jquery-1.11.0.min.js

This file was deleted.

2 changes: 0 additions & 2 deletions demo/js/zepto.min.js

This file was deleted.

12 changes: 12 additions & 0 deletions libs/jquery-loader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(function () {
// Default to the local version.
var path = '../libs/jquery/jquery-1.11.1.js';
// Get any jquery=___ param from the query string.
var jqversion = location.search.match(/[?&]jquery=(.*?)(?=&|$)/);
// If a version was specified, use that version from code.jquery.com.
if (jqversion) {
path = '../libs/jquery/jquery-' + jqversion[1] + '.js';
}

document.write('<script src="' + path + '"></script>');
}());
Loading

0 comments on commit 87461de

Please sign in to comment.