Created
May 15, 2009 16:50
-
-
Save jamescook/112294 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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