Advertisement
Guest User

Untitled

a guest
Apr 1st, 2013
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. var fJS;
  2. jQuery(document).ready(function() {
  3. fJS = filterInit();
  4. });
  5.  
  6. function filterInit() {
  7.  
  8. var template, html = jQuery.trim(jQuery("#template").html());
  9.  
  10. template = Mustache.compile(html);
  11.  
  12. var view = function(coach){
  13. console.log(coach.c_name);
  14.  
  15. id = coach.id;
  16. cname = this.span({'class': 'cname'}, coach.c_name);
  17. csurname = this.span({'class': 'csurname'}, coach.c_surname);
  18. ccountry = this.div({'class': 'ccountry'}, coach.c_country);
  19.  
  20.  
  21. return this.link('http://xxx.com/coach-profile/?coach=' + coach.id ,{'title': coach.c_name}, [cname,csurname,ccountry]);
  22. };
  23.  
  24. var settings = {
  25. search: {input: '#search_box' },
  26. and_filter_on: true,
  27. };
  28.  
  29. return FilterJS(coaches, "#list_coaches", mustacheView, settings);
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement