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)
More Related Contents:
- Can I set a value to the golbal variable in $(document).ready(function(){}); and use the same variable outside? [closed]
- ng-repeat finish event
- When should I use jQuery’s document.ready function?
- What’s the easiest way to call a function every 5 seconds in jQuery? [duplicate]
- What is the difference between $(window).load and $(document).ready?
- Making custom right-click context menus for my web-app
- How to create a jQuery plugin with methods?
- JQuery to load Javascript file dynamically
- Using jQuery, Restricting File Size Before Uploading
- $(document).ready shorthand
- Get query string parameters url values with jQuery / Javascript (querystring)
- Why “$().ready(handler)” is not recommended?
- How do I drag multiple elements at once with JavaScript or jQuery?
- Why is my ‘load’ event/function not beeing executed after switching to jQuery 3?
- I’d like to understand the jQuery plugin syntax
- Compress images on client side before uploading [closed]
- How to disable tooltip in the browser with jQuery?
- Is there a full working example for a jqGrid ColumnChooser? [closed]
- How well does jQuery support backward compatibility?
- Pie chart with jQuery
- How to individually target multiple dropdowns in CSS for Dropkick Plug-in
- jQuery $(document).ready () fires twice
- How to detect an audio has finished playing in a web page?
- Implementing jquery UI autocomplete to show suggestions when you type “@”
- Javascript, Razor and Escape characters. Like apostrophe
- Highcharts – Keep tooltip showing on click
- Jquery: Filter dropdown list as you type [closed]
- Alternative to eval() javascript [duplicate]
- Queue AJAX calls
- How to write a simple jQuery plugin [closed]