Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$('myButton').observe('click',function(evt){
var opts = $w('page_one.html page_two.html page_three.html page_four.html');
return window.location.href = opts[Math.floor(Math.random() * opts.length)];
}).setStyle('cursor:pointer');
@walterdavis
Copy link
Author

walterdavis commented Jul 24, 2011

This should be applied (by means of editing the ID of the button image) to a single layered image, no link or other tags needed. The script will add the button behavior automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment