I'm trying to redirect after page + images load:
function redirect_on_load(){
//called from script in body
//wait until page loads and click first link
$(window).load(
function() {
$('a').click(); // desired action. ineffective
$('a')[0].click(); // kills script
$('a').get(0).click(); // kills script
$('a').hide(); // works
}
);
}
There's only one link on the page.
Why doesn't the click method work?