Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function() {
- filterEffect('#options', '#items');
- filterEffect('#options2', '#items2');
- });
- function filterEffect(nav, items){
- $(nav+" a").click(function() {
- var type = $(this).attr('rel');
- if(type !== 'all'){
- $(items+" li."+type).animate({'width' : 150, 'opacity' : 1});
- $(items+" li:not(."+type+")").animate({'width' : 0, 'opacity' : 0});
- }else{
- $(items+" li").animate({'width' : 150, 'opacity' : 1});
- }
- return false;
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement