toggle / showhide with YUI javascript library


/ Published in: JavaScript
Save to your folder(s)

For this snippet you need the files: yahoo-dom-event.js and animation-min.js from the Yahoo User Interface Library (version 2.4.1).

To use this snippet add a class "toggle" to a link which should toggle the effect. To this link add a rel attribute. This attribute contains: id of object to toggle, animation type, animation duration.

Toggle element #1

This will toggle the div with id "example1", the effect used will be "fade" and it will take "20" frames.

URL: http://www.lutsr.nl/yui/toggle/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.