PDA

View Full Version : Fancy JS Buttons..?



samuurai
09-01-2008, 08:07 AM
Hi,

I want to make some buttons similar to the ones when you hover over

Tutorials Dijit Dojox

in

http://dojocampus.org/explorer/

Does anyone have any links to tutorials? Google hasn't been my friend today.

Thanks in advance!

Beren

Philip M
09-01-2008, 11:46 AM
Have a look at:-

http://www.webmonkey.com/tutorial/Create_rollover_button_without_JavaScript

samuurai
09-02-2008, 07:19 PM
Thanks, but I don't think that will give me the cool bouncing effect of the little tabs as they retract back in.

VIPStephan
09-02-2008, 07:35 PM
Sometimes there are better friends than Google and this time the friend is common sense (and the web developer toolbar): View the source code, find the elements that mark up the navigation in question. The navigation items have a class called “headlink”. A quick search (Ctrl+F/Cmd+F) for “headlink” in the JavaScript files reveals that the function is written/executed in http://dojocampus.org/explorer/featureexplorer/featureexplorer.js Obviously this is a JavaScript framework (as I have suspected already – alough I didn’t know that one yet) and a quick search for “addonload” (since that function name was unfamiliar to me) brought me to http://dojotoolkit.org/ where you have everything you need to create that very effect.

On a side note: the Dojo toolkit isn’t the only one that can do this. Mootools et al have similar functions (easeIn, easeOut etc.).