How does the jqueryUI autocomplete example get away with not using $(document).ready
I am determined to figure out how the example at http://jqueryui.com/demos/autocomplete/#default works without being wrapped in a $(document).ready because I just spend over an hour and a half trying unsuccessfully to reproduce开发者_JAVA百科 this when all I needed to do was wrap it in the $(document).ready
At the very bottom of the source I see this one, but nothing to do with the autocomplete.
<script type="text/javascript">
$(document).ready(function() {
$('a').click(function(){
this.blur();
});
});
</script>
the $(function () {blah})
is the same as using $(document).ready. It's the third syntax in the docs.
精彩评论