Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MyNav = {
- initNavTrough: function(){
- $('nav-products').observe('click', function(ev){ ev.stop(); swapSubnav('cat-list')});
- }
- swapSubnav: function(el){
- var visibles = new Array();
- $$('#subnav ul').each(function(e){
- if(el.style.display != "none"){ visibles.push(e) }
- });
- visibles.each(function(e){ e.style.display = "none" });
- $(el).style.display = "block";
- }
- }
- document.observe('dom:loaded', MyNav.initNavTrough);
Add Comment
Please, Sign In to add comment