I have some code in document.ready that fires, however it is firing too fast. It depends on some JavaScript creation or something first otherwise I get an ill effect.
What I have done is put the code I want to run last in a setTimeout-Zero which basically pushes it's delegate to run last. This works fine.
Is there a better approach in order to get around this timing issue and ensure my code runs later? I am solving an issue that is only in IE.
$(document).ready(function() {
window.setTimeout(function() {
$('#accordionmain').trigger('click');
//$('#accordionmain').trigger('click');
}, 0);