Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var fJS;
- jQuery(document).ready(function() {
- fJS = filterInit();
- });
- function filterInit() {
- var template, html = jQuery.trim(jQuery("#template").html());
- template = Mustache.compile(html);
- var view = function(coach){
- console.log(coach.c_name);
- id = coach.id;
- cname = this.span({'class': 'cname'}, coach.c_name);
- csurname = this.span({'class': 'csurname'}, coach.c_surname);
- ccountry = this.div({'class': 'ccountry'}, coach.c_country);
- return this.link('http://xxx.com/coach-profile/?coach=' + coach.id ,{'title': coach.c_name}, [cname,csurname,ccountry]);
- };
- var settings = {
- search: {input: '#search_box' },
- and_filter_on: true,
- };
- return FilterJS(coaches, "#list_coaches", mustacheView, settings);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement