JSFiddle - React, Tailwind, and code Playground
by jhoguet
HTML
<script src="http://code.jquery.com/jquery-1.7.2.js "></script>
<div></div>
JavaScript
// Problem:
// early on a document ready callback throws
// then later - document ready never fires for other callbacks, even ones added after the fact
setTimeout(function(){
$(function(){
$('div').append('<p>doing bad things</p>');
// comment out the throw to see expected behavior
throw {};
});
}, 0);
setTimeout(function(){
$('div').append('<p>timeout triggered</p>');
$(function(){
$('div').append('<p>doing good things</p>');
});
} , 500);