Is it possible to know when a page has loaded using location.href? My current code looks like this and I want to trigger some events to happen once my page has finished loading. I tried using $.get but it breaks my current implementation of jquery address so this won’t work.
$('.search').click(function(){
location.href = "/search.php";
// trigger event here...
return false;
});
This will NOT work for my current setup:
$.get('search.php', function() {
alert('Page has finished loading');
});
Are there any other options?
Have you tried this:
EDIT: Removed second portion of answer since the purposeful redirect negates it’s usefullness