I'm using the .length
method in a conditional statement that polls the page for the presence of an externally-loaded object (I can't style it with jQuery until it exists):
function hackyFunction() { if($('#someObject').length<1) { setTimeout(hackyFunction,50) } else { $('#someObject').someMethod() }}
Is length
the best way to do this?