Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2013
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var fJS;
  2. jQuery(document).ready(function() {
  3.   fJS = filterInit();
  4.   });
  5. function filterInit() {
  6.   var template, html = jQuery.trim(jQuery("#template").html());
  7.   template = Mustache.compile(html);
  8.      var view = function(c){
  9.      c.uid = c.fk_id_user;
  10.      c.cname = c.c_name;
  11.      c.csurname = c.c_surname;
  12.      c.ccountry = c.c_country;
  13.       return template(c);
  14. };
  15.  
  16.   var settings = {
  17.     filter_criteria: {
  18.           cname: ['#name_list input:checkbox', 'c_name'],
  19.           csurname: ['#surname_list input:checkbox ','c_surname'],
  20.           ccountry: ['#country_list input:checkbox ','c_country']
  21.     },
  22.       search: {input: '#searchbox' },
  23.       and_filter_on: false,  
  24.   };
  25.   return FilterJS(coaches, "#list_coaches", view, settings);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement