Scripts
Go here for the main page.
Javascript - hover for more details
- Easy Javascript fades, colour changes and other transitions
This simple script changes the class of an item on a certain event. To use it simply provide it with an action and an element, e.g. onmouseout="hide('example')". This will change the class of the item for you. To work in transitions such as fades, I just set up the new class with a CSS transition:
function hide(element)
{
document.getElementById(element).setAttribute("class", "className");
}
Transition code (adapted for multi-browser compatibility):
transition: all 0.75s ease-in-out;
-webkit-transition: all 0.75s ease-in-out;
-moz-transition: all 0.75s ease-in-out;
Go here for the main page.