Skip to content

Commit

Permalink
Release 0.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
vodkabears committed May 15, 2014
1 parent a3e9687 commit 8412158
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 32 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "remodal",
"version": "0.1.5",
"version": "0.1.6",
"homepage": "http://vodkabears.github.io/remodal/",
"authors": [
"Ilya Makarov <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion dist/jquery.remodal.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Remodal - v0.1.5 - 2014-05-03
/*! Remodal - v0.1.6 - 2014-05-16
* https://github.com/VodkaBears/remodal
* Copyright (c) 2014 VodkaBears; */

Expand Down
52 changes: 27 additions & 25 deletions dist/jquery.remodal.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Remodal - v0.1.5 - 2014-05-03
/*! Remodal - v0.1.6 - 2014-05-16
* https://github.com/VodkaBears/remodal
* Copyright (c) 2014 VodkaBears; */
;(function ($) {
Expand Down Expand Up @@ -257,34 +257,36 @@
};
}

/**
* data-remodal-target opens a modal window with a special id without hash change.
*/
$(document).on("click", "[data-" + pluginName + "-target]", function (e) {
e.preventDefault();

var elem = e.currentTarget,
id = elem.getAttribute("data-" + pluginName + "-target"),
$target = $("[data-" + pluginName + "-id=" + id + "]");
$(document).ready(function () {
/**
* data-remodal-target opens a modal window with a special id without hash change.
*/
$(document).on("click", "[data-" + pluginName + "-target]", function (e) {
e.preventDefault();

$[pluginName].lookup[$target.data(pluginName)].open();
});
var elem = e.currentTarget,
id = elem.getAttribute("data-" + pluginName + "-target"),
$target = $("[data-" + pluginName + "-id=" + id + "]");

/**
* Auto initialization of modal windows.
* They should have the 'data-remodal' attribute.
* Also you can pass params into the modal throw the data-remodal-options attribute.
* data-remodal-options must be a JSON string without brackets.
*/
$(document).find("." + pluginName).each(function (i, container) {
var $container = $(container),
options = $container.data(pluginName + "-options");
$[pluginName].lookup[$target.data(pluginName)].open();
});

if (!options) {
options = {};
}
/**
* Auto initialization of modal windows.
* They should have the 'data-remodal' attribute.
* Also you can pass params into the modal throw the data-remodal-options attribute.
* data-remodal-options must be a JSON string without brackets.
*/
$(document).find("." + pluginName).each(function (i, container) {
var $container = $(container),
options = $container.data(pluginName + "-options");

if (!options) {
options = {};
}

$container[pluginName](options);
$container[pluginName](options);
});
});

/**
Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.remodal.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion remodal.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"ui",
"zepto"
],
"version": "0.1.5",
"version": "0.1.6",
"author": {
"name": "Ilya Makarov",
"email": "[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion src/jquery.remodal.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Remodal - v0.1.5 - 2014-05-03
/*! Remodal - v0.1.6 - 2014-05-16
* https://github.com/VodkaBears/remodal
* Copyright (c) 2014 VodkaBears; */

Expand Down
2 changes: 1 addition & 1 deletion src/jquery.remodal.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Remodal - v0.1.5 - 2014-05-03
/*! Remodal - v0.1.6 - 2014-05-16
* https://github.com/VodkaBears/remodal
* Copyright (c) 2014 VodkaBears; */
;(function ($) {
Expand Down

0 comments on commit 8412158

Please sign in to comment.