Differences between document.ready and $function [duplicate]

They are the same. Check out the jQuery .ready() docs. Here’s a quote from the docs:

All three of the following syntaxes are equivalent:

$(document).ready(handler)

$().ready(handler) (this is not recommended)

$(handler)

Leave a Comment