/ Published in: JavaScript
Used to make a show/hide nagigation w/ prototype js framework
HTML looks like:
<h3><a href="#">Repository <span>(+)</span> </a></h3>
<ul>
Expand |
Embed | Plain Text
Event.observe(window, 'load', function() { $('repository_list').hide(); $('genre_list').hide(); $('collection_list').hide(); }); function toggleIt(type){ $(type).toggle(); if($(type).visible()){ $(type + '_a').update('(-)'); } else { $(type + '_a').update('(+)'); } }
You need to login to post a comment.
