What is the difference between $(document).ready(function() and $(function() ?

yes, they’re doing the same thing. the $() function wraps $(document).ready() when the parameter to the call is a single function object.

(Edited to reflect a question in comment)

Leave a Comment