we love web standards, css, html, actionscript, php, javascript, accesibility and usability

Archive for October, 2007

jQuery Image Swap

Friday, October 12th, 2007

jQuery does a fantastic job at simplifying JavaScript. Below is an example for those of you still relying on DreamWeaver’s Image Rollover (MM Image Swap). The better alternative is using proper image replacement techniques.

$(‘img#nav1′).hover(function() {
$(this).attr(“src”,”/images/headerNav/1-over.gif”);
}, function() {
$(this).attr(“src”,”/images/headerNav/1.gif”);
});

<img src=”1.gif” id=”nav1″ />
And there you have it! Coming up next is the SEO case study of duffynewport.com.

Posted in i came as a rant, jQuery, work | 11 Comments