Is this a double document ready?
问题 I'm working with a script and have found the following, which I really can't find any info of what it means (function($) { $(document).ready(function(e) { ... bla bla bla ... }); }) (jQuery); Is (function($){}) (jQuery); the same as $(function () {}); ? and if so, why would somebody define twice document.ready ? 回答1: No, it's not the same. It's an anonymous function which is being passed the jQuery object, to insure that it is available as the local variable $ within the scope of the function