I have noticed the use of $(document)
and $(\'body\')
when we want to reference the entire page, especially when binding events.
$(
'document' keyword is just a handle on the object that contains the whole HTML Document. On the other hand In jQuery, $('body') contains the body portion the HTML document. But in reality, you won't notice a difference of behavior between them.
For any further information about several jQuery functions and their working procedure, visit: jQuery function