Document ready interruption

When an error occurs in a previous document ready event, the following event(s) will not execute.

by spring1975

HTML

<div id="testline1">1st $(document).ready() has not fired.</div>
<div id="testline2">2nd $(document).ready() has not fired.</div>
<div id="testline3">3rd $(document).ready() has not fired.</div>
<div id="testline4">4th $(document).ready() has not fired.</div>

JavaScript

//Example of prevented code
$('document').ready(function () {
	$('#testline1').text('1st document ready has fired.');
});
//This is actually an alternate way to call document.ready
$(function () {
	$('#testline2').text('2nd document ready has fired.');
});

//Example of error caused 
$(function () {
	document.getElementById(au);
});

//Example of prevented code
$('document').ready(function () {
	$('#testline3').text('3rd document ready has fired.');
});
$(function () {
	$('#testline4').text('4th document ready has fired.');
});