daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest Apr 30th, 2014 249 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  $(function() {
  2.  
  3.         filterEffect('#options', '#items');
  4.         filterEffect('#options2', '#items2');
  5.  });
  6.  
  7.  
  8.  function filterEffect(nav, items){
  9.      $(nav+" a").click(function() {
  10.          var type = $(this).attr('rel');    
  11.          if(type !== 'all'){
  12.             $(items+" li."+type).animate({'width' : 150, 'opacity' : 1});
  13.             $(items+" li:not(."+type+")").animate({'width' : 0, 'opacity' : 0});
  14.           }else{
  15.             $(items+" li").animate({'width' : 150, 'opacity' : 1});
  16.           }          
  17.         return false;
  18.     });
  19.  }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top