Reputation: 9083
I want to know if there is any event which confirms that the complete page has been loaded without any errors using JQuery.
Without any errors : I mean if some of the js or css files are missing then the page loads with errors.
Upvotes: 1
Views: 72
Reputation: 27313
No you cannot make sure if there was some error on the page. Depending on the browser you might be able to use some specific API like firebug api in firefox but there is no standard way to do it.
If by error you mean any javascript error like syntax error runtime errors
Upvotes: 1
Reputation: 15835
errors can happen inside , but below one ensures everything is loaded including graphics
$(window).load(function () {
// run code
});
Upvotes: 0
Reputation: 3887
$(document).ready(function(){
//the DOM is ready for manipulation
});
$(document).load(function(){
//the DOM is ready and external resources have been downloaded.
//this may not always fire due to failed requests for external resources.
});
Upvotes: 2