Skip to content

Commit

Permalink
💄 code style
Browse files Browse the repository at this point in the history
  • Loading branch information
vodkabears committed Jan 22, 2015
1 parent 5d71bcb commit 2028005
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 32 deletions.
36 changes: 18 additions & 18 deletions examples/index-zepto.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,39 +107,39 @@ <h1>Another one window</h1>

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

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

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

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

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

$(document).on('cancel', '.remodal', function () {
console.log('cancel');
$(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();
// });
// 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();
var inst = $("[data-remodal-id=modal2]").remodal();
// inst.open();
</script>
</body>
Expand Down
26 changes: 13 additions & 13 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,39 +108,39 @@ <h1>Another one window</h1>

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

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

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

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

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

$(document).on('cancel', '.remodal', function () {
console.log('cancel');
$(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')];
// 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();
var inst = $("[data-remodal-id=modal2]").remodal();
// inst.open();
</script>
</body>
Expand Down
3 changes: 2 additions & 1 deletion src/jquery.remodal.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@
* @param {String|undefined} reason A reason to close
*/
Remodal.prototype.close = function(reason) {
// Check if animation is complete

// Check if the animation was completed
if (this.busy) {
return;
}
Expand Down

0 comments on commit 2028005

Please sign in to comment.