Skip to content

Instantly share code, notes, and snippets.

@jamescook
Created May 15, 2009 16:50
Show Gist options
  • Save jamescook/112294 to your computer and use it in GitHub Desktop.
Save jamescook/112294 to your computer and use it in GitHub Desktop.
document.observe("dom:ready", function()
{
var images = $$('img'); // img should replaced with a selector, like img.thumbnail
images.each( function(img)
{
Event.observe(img, 'mouseover', function()
{
console.log("yarrr");
$('my-image-placeholder').setAttribute('src', 'the-image-location.png');
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment