Advertisement
Guest User

Untitled

a guest
Nov 8th, 2015
122
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function portfolio_isotope(){
  2.  
  3. //init isotope
  4. $('.portfolios').isotope({
  5. itemSelector: '.portfolio-item',
  6. animationEngine: 'best-available',
  7. filter: "*"
  8. });
  9.  
  10. if($(window).width() <= 1024 && isResponsive==1) {
  11. //Set Portfolio Height on Mobile
  12. var portfolioWidth=$('.portfolio-item').width();
  13. $('.portfolio-item').css('height',portfolioWidth+'px');
  14. }
  15. }
  16. $(window).load(function(){portfolio_isotope();});
  17. $(window).resize(function(){portfolio_isotope();});
  18.  
  19. $('#filter a').click(function(){
  20. var selector = $(this).attr('data-filter');
  21. $('.portfolios').isotope({
  22. filter: selector
  23. });
  24. $(this).parent().attr('class','filter_current');
  25. $(this).parent().siblings().removeAttr('class');
  26. return false;
  27. });
Advertisement
RAW Paste Data Copied
Advertisement