I use a lot of jQuery, so I have to keep typing out the $(document).ready function to put the jQuery code. Is there a shorter form of the function?
Solution 1:
The three following syntaxes are allowed:
Syntax 1
$(document).ready(function)
Syntax 2
$().ready(function)
Syntax 3
$(function)
Update:
Additionally, from version 1.9 onwards:
$(window).on('load', null, function)
$(document).on('ready', null, function)
Post a Comment for "Shorter Form Of Writing Jquery $(document).ready Function"