version 0.2.1
This commit is contained in:
parent
2d115c73e1
commit
de0ce4e93d
2 changed files with 8 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @preserve jQuery Plugin: Table Filter - version 0.2
|
||||
* @preserve jQuery Plugin: Table Filter - version 0.2.1
|
||||
*
|
||||
* LICENSE: http://hail2u.mit-license.org/2009
|
||||
*/
|
||||
|
|
14
jquery.table-filter.min.js
vendored
14
jquery.table-filter.min.js
vendored
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
jQuery Plugin: Table Filter - version 0.2
|
||||
|
||||
LICENSE: http://hail2u.mit-license.org/2009
|
||||
*/
|
||||
(function(a){a.fn.addTableFilter=function(d){var b=a.extend({},a.fn.addTableFilter.defaults,d),c,e;this.is("table")&&(this.attr("id")||this.attr({id:"t-"+Math.floor(99999999*Math.random())}),c=this.attr("id"),d=c+"-filtering",e=a("<label/>").attr({"for":d}).append(b.labelText),b=a("<input/>").attr({id:d,type:"text",size:b.size}),a("<p/>").addClass("formTableFilter").append(e).append(b).insertBefore(this),a("#"+d).delayBind("keyup",function(){var b=a(this).val().toLowerCase().split(" ");a("#"+c+" tbody tr").each(function(){var d=
|
||||
a(this).html().toLowerCase().replace(/<.+?>/g,"").replace(/\s+/g," "),c=0;a.each(b,function(){if(0>d.indexOf(this))return c=1,!1});c?a(this).hide():a(this).show()})},300));return this};a.fn.addTableFilter.defaults={labelText:"Keyword(s): ",size:32};a.fn.delayBind=function(d,b,c,e){a.isFunction(b)&&(e=c,c=b,b=void 0);var g=this,f=null;return this.bind(d,b,function(b){clearTimeout(f);f=setTimeout(function(){c.apply(g,[a.extend({},b)])},e)})}})(jQuery);
|
||||
/*
|
||||
jQuery Plugin: Table Filter - version 0.2.1
|
||||
|
||||
LICENSE: http://hail2u.mit-license.org/2009
|
||||
*/
|
||||
(function(a){a.fn.addTableFilter=function(d){var b=a.extend({},a.fn.addTableFilter.defaults,d),c,e;this.is("table")&&(this.attr("id")||this.attr({id:"t-"+Math.floor(99999999*Math.random())}),c=this.attr("id"),d=c+"-filtering",e=a("<label/>").attr({"for":d}).append(b.labelText),b=a('<input type="search"/>').attr({id:d,size:b.size}),a("<p/>").addClass("formTableFilter").append(e).append(b).insertBefore(this),a("#"+d).delayBind("keyup",function(){var b=a(this).val().toLowerCase().split(" ");a("#"+c+
|
||||
" tbody tr").each(function(){var d=a(this).html().toLowerCase().replace(/<.+?>/g,"").replace(/\s+/g," "),c=0;a.each(b,function(){if(0>d.indexOf(this))return c=1,!1});c?a(this).hide():a(this).show()})},300));return this};a.fn.addTableFilter.defaults={labelText:"Keyword(s): ",size:32};a.fn.delayBind=function(d,b,c,e){a.isFunction(b)&&(e=c,c=b,b=void 0);var g=this,f=null;return this.bind(d,b,function(b){clearTimeout(f);f=setTimeout(function(){c.apply(g,[a.extend({},b)])},e)})}})(jQuery);
|
Loading…
Add table
Add a link
Reference in a new issue