« slightestBox (lightbox/litebox replacement) How I Spent My Winter Vacation »
jQuery Image Swap
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.
Friday, October 12th, 2007 at 11:28 am and is filed under i came as a rant, jQuery, work. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.