You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
1.5 KiB
JavaScript
8 lines
1.5 KiB
JavaScript
/*!
|
|
SearchFade 0.0.1
|
|
2018 SpryMedia Ltd - datatables.net/license
|
|
*/
|
|
(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(c){return b(c,window,document)}):"object"===typeof exports?module.exports=function(c,a){c||(c=window);if(!a||!a.fn.dataTable)a=require("datatables.net")(c,a).$;return b(a,c,c.document)}:b(jQuery,window,document)})(function(b,c,a){b.fn.dataTable.Api.register("searchFade()",function(){return this});b.fn.dataTable.Api.register("searchFade().node()",function(){return this.settings()[0].searchFadeNode});b.fn.dataTable.SearchFade=
|
|
function(c){var d=new b.fn.dataTable.Api(c),a=b('<div class="searchFade"/>');d.settings()[0].searchFadeNode=a;a.empty();a.append("Search: ");b('<input type="text" class="searchFadeInput'+d.settings()[0].sTableId+'">').appendTo(a);a.on("keyup redraw","input",function(){d.rows(":visible").every(function(a){var c=!0;b(".searchFadeInput"+d.settings()[0].sTableId).val().length&&(c=d.row(a).data().some(function(a){return null!=a.match(RegExp(b(".searchFadeInput"+d.settings()[0].sTableId).val(),"i"))}));
|
|
b(d.row(a).node()).toggleClass("notMatched",!c)})});d.on("draw",function(){b("input",a).trigger("redraw")});this.node=function(){return a}};b.fn.DataTable.SearchFade=b.fn.dataTable.SearchFade;b.fn.dataTable.ext.feature.push({fnInit:function(a){return(new b.fn.dataTable.SearchFade(a)).node()},cFeature:"F"});b(a).on("init.dt",function(a,c){"dt"===a.namespace&&b.fn.dataTable.SearchFade(c)})});
|