Created
March 9, 2012 14:45
-
-
Save walterdavis/2006802 to your computer and use it in GitHub Desktop.
This file contains 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
new Ajax.Updater('list_1999','comics/1999/list.php',{method: 'get'}); | |
new Ajax.Updater('list_2000','comics/2000/list.php',{method: 'get'}); | |
new Ajax.Updater('list_2001','comics/2001/list.php',{method: 'get'}); | |
document.observe('click', function(evt){ | |
var elm; | |
if(elm = evt.findElement('a.ajax')){ | |
evt.stop(); | |
var link = elm.href; | |
var display = elm.up('div.section').down('div.comic'); | |
display.update('<img src="' + link + '" alt="" />'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment