What's the difference (if any) between:
$(document).ready(function() {
$(function() {
$("#selector").doSomething();
});
});
and:
$(document).ready(function() {
$("#selector").doSomething();
});
I'm asking because I would ordinarily use the second bit of code, but the jQuery Mobile website gave the first bit of code as the example.