jQuery document ready function

后端 未结 7 1206
南旧
南旧 2020-12-03 17:20

Are the end results of the following jQuery snippets identical?

Snippet 1:

$(function() { alert(\'test!\'); });

7条回答
  •  醉酒成梦
    2020-12-03 17:59

    Different ways to write jQuery Document Ready Snippet

    $(document).ready(function() { ... }); 
    $(function() { ... });
    jQuery(document).ready(function() { ... });
    jQuery(function() { ... });
    

    http://webiwip.com/interview-questions-answers/jquery-interview-questions/10510

提交回复
热议问题