Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
vodkabears committed May 1, 2015
1 parent 28d507f commit 6ca3d50
Show file tree
Hide file tree
Showing 2 changed files with 325 additions and 83 deletions.
226 changes: 178 additions & 48 deletions examples/index-zepto.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,98 +7,220 @@
<meta name="description" content="Remodal example">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../dist/jquery.remodal.css">
<style>
.remodal-bg.with-red-theme.remodal-is-opening,
.remodal-bg.with-red-theme.remodal-is-opened {
filter: none;
}

.remodal-overlay.with-red-theme {
background-color: #f44336;
}

.remodal.with-red-theme {
background: #fff;
}
</style>
</head>
<body>
<div class="remodal-bg">
<a href="#modal">Click</a>
<a href="#modal">Modal №1</a><br>
<a href="#modal2">Modal №2</a>
<br><br>

<h1>Remodal</h1>
<p>
Flat, responsive, lightweight, fast, easy customizable modal window plugin
with declarative state notation and hash tracking.
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Minified version size: ~4kb
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Flat, responsive, lightweight, fast, easy customizable modal window plugin
with declarative state notation and hash tracking.
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Minified version size: ~4kb
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Flat, responsive, lightweight, fast, easy customizable modal window plugin
with declarative state notation and hash tracking.
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Minified version size: ~4kb
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Flat, responsive, lightweight, fast, easy customizable modal window plugin
with declarative state notation and hash tracking.
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Minified version size: ~4kb
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Flat, responsive, lightweight, fast, easy customizable modal window plugin
with declarative state notation and hash tracking.
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Minified version size: ~4kb
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Flat, responsive, lightweight, fast, easy customizable modal window plugin
with declarative state notation and hash tracking.
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Minified version size: ~4kb
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Flat, responsive, lightweight, fast, easy customizable modal window plugin
with declarative state notation and hash tracking.
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Minified version size: ~4kb
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>

<h1>Remodal</h1>
<p>
Responsive, lightweight, fast, fully customizable modal window plugin
with declarative configuration and hash tracking.
</p>
<br>
</div>

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

<div data-remodal-id="modal2">
<div>
<h1>Another one window</h1>
<h2>Another one window</h2>
<p>
Hello!
</p>
Expand All @@ -116,50 +238,58 @@ <h1>Another one window</h1>
// closeOnConfirm: true,
// closeOnCancel: true,
// closeOnEscape: true,
// closeOnAnyClick: true
// closeOnAnyClick: true,
// modifier: ''
// }
// };
</script>

<script src="../libs/zepto/zepto.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/zepto/1.1.4/zepto.js"></script>
<script>window.Zepto || document.write('<script src="../libs/zepto/zepto.min.js"><\/script>')</script>
<script src="../dist/jquery.remodal.js"></script>

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

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

$(document).on('close', '.remodal', function (e) {
console.log('close' + (e.reason ? ', reason: ' + e.reason : ''));
$(document).on('closing', '.remodal', function (e) {
console.log('closing' + (e.reason ? ', reason: ' + e.reason : ''));
});

$(document).on('closed', '.remodal', function (e) {
console.log('closed' + (e.reason ? ', reason: ' + e.reason : ''));
});

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

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

// You can open or close it like this:
// $(function () {
// var inst = $.remodal.lookup[$('[data-remodal-id=modal]').data('remodal')];
// inst.open();
// inst.close();
// });
// Usage:
// $(function() {
//
// // In this case the initialization function returns the already created instance
// var inst = $('[data-remodal-id=modal]').remodal();
//
// inst.open();
// inst.close();
// inst.getState();
// inst.destroy();
// });

// Or init in this way:
var inst = $('[data-remodal-id=modal2]').remodal();
// inst.open();
// The second way to initialize:
$('[data-remodal-id=modal2]').remodal({
modifier: 'with-red-theme'
});
</script>
</body>
</html>
Loading

0 comments on commit 6ca3d50

Please sign in to comment.