document.ready() function confusion
Hi.
I am novice to JQuery and i am having difficulty understanding this concept. When we are talking
about document.ready() function we say that
- $(document).ready(function()
- {
- //some code
- });
is equivalent to
- $(function()
- {
- //some code
- });
When we look at the jQuery documentation, something like this is written there.
- else if ( jQuery.isFunction( selector ) ) {
- return rootjQuery.ready( selector );
- }
This is what handles the part written above. I am not able to understand this. Please help clarifying this
confusion.
Thanks,
Peter