Permalink
Browse files

Add data Filter. Closes #29

Add $.nmData function. Closes #29
  • Loading branch information...
nyroDev committed Feb 14, 2011
1 parent fc10b79 commit 1048e26d5f9cc4bd689674ee79f73c706cc88e76
Showing with 34 additions and 1 deletion.
  1. +29 −0 js/jquery.nyroModal.filters.data.js
  2. +1 −1 js/jquery.nyroModal.filters.image.js
  3. +4 −0 js/jquery.nyroModal.js
@@ -0,0 +1,29 @@
/*
* nyroModal v2.0.0
*
* Data filter
*
* Depends:
* - filters.link
*
* Before: filters.dom
*/
jQuery(function($, undefined) {
$.nmFilters({
data: {
is: function(nm) {
var ret = nm.data ? true : false;
if (ret) {
nm._delFilter('dom');
}
return ret;
},
init: function(nm) {
nm.loadFilter = 'data';
},
load: function(nm) {
nm._setCont(nm.data);
}
}
});
});
@@ -6,7 +6,7 @@
* Depends:
* - filters.link
*
* Before: filters.dom
* Before: filters.data
*/
jQuery(function($, undefined) {
$.nmFilters({
View
@@ -532,6 +532,9 @@ jQuery(function($, undefined) {
href: url
}).nyroModal(opts).trigger('nyroModal');
},
nmData: function(data, opts) {
this.nmManual('#', $.extend({data: data}, opts));
},
nmObj: function(opts) {
$.extend(true, _nmObj, opts);
},
@@ -815,6 +818,7 @@ jQuery(function($, undefined) {
// Add global jQuery functions
$.extend({
nmManual: _internal.nmManual,
nmData: _internal.nmData,
nmObj: _internal.nmObj,
nmInternal: _internal.nmInternal,
nmAnims: _internal.nmAnims,

0 comments on commit 1048e26

Please sign in to comment.