Advertisement
Guest User

Untitled

a guest
Nov 26th, 2015
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. /**
  2. * custom js functions
  3. */
  4. jQuery(function ($) {
  5.  
  6. // filterable properties.
  7. var $container = $('.properties');
  8. $container.isotope({
  9. filter: '*',
  10. animationOptions: {
  11. duration: 750,
  12. easing: 'linear',
  13. queue: false,
  14. }
  15. });
  16.  
  17. $('nav.primary ul a').click(function(){
  18. var selector = $(this).attr('data-filter');
  19. $container.isotope({
  20. filter: selector,
  21. animationOptions: {
  22. duration: 750,
  23. easing: 'linear',
  24. queue: false,
  25. }
  26. });
  27. return false;
  28. });
  29.  
  30. var $optionSets = $('nav.primary ul'),
  31. $optionLinks = $optionSets.find('a');
  32.  
  33. $optionLinks.click(function(){
  34. var $this = $(this);
  35. // don't proceed if already selected
  36. if ( $this.hasClass('selected') ) {
  37. return false;
  38. }
  39. var $optionSet = $this.parents('nav.primary ul');
  40. $optionSet.find('.selected').removeClass('selected');
  41. $this.addClass('selected');
  42. });
  43.  
  44. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement