Вход Регистрация
Файл: src/public/js/filterize.js
Строк: 50
<?php
(function ( $ ) {
 
    $.
fn.filterize = function( options ) {
 
        var 
settings = $.extend({
            
endpoint"localhost",
            
query_strings: {'Date'null,'Status'null,'Sort'null,'Page'null,'Search':null},
            
panel:"<div>test<div>",
            
divider"<div>divider</div>"
        
}, options );

        if (
window.location.href.indexOf("?") > -1) {
          var 
qs window.location.href.split('?')[1];
          var 
parts qs.split('&');
          $.
each(parts, function() {
              var 
val this.split('=');
              
settings["query_strings"][val[0]] = val[1];
          });
        }
        
// Greenify the collection based on the settings variable.
        
return this.on('click',this,function(e){
            
target = $(this).data("key");
            if (
target!="Search") {
              
id = $(this).data("value");
            }else{
              
id = $(this).val();
            }
            
settings["query_strings"][target] = id;
            $(
this).attr("href","?"+$.param(settings["query_strings"]))
        });
    };
 
}( 
jQuery ))
$(
document).ready(function(){
    $(
'.filterize').filterize({endpoint:"http://kaankilic.com/codecanyon/InvoicifyMS/public/api/invoices"});   
});
?>
Онлайн: 1
Реклама