解决方法
轻微更改:
$(document).ready(function() {});
等于:
$(function() {});
从jQuery 1.4:$()。ready(function(){});在所有情况下不再正确工作。从发行说明:
As of jQuery 1.4,if you pass no arguments in to the jQuery() method,an empty jQuery set will be returned. In prevIoUs versions of jQuery,a set containing the document node would be returned.