JQuery funtionality

Is     $()   equivalent to   $(window) ?
metro156Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
GaryConnect With a Mentor Commented:
That's the long way and the above is the shorthand way
0
 
GaryCommented:
No
$() does nothing as you are trying to attach it to nothing.
0
 
metro156Author Commented:
Isn't there an  jQuery  statement  that defaults to $(window) or $(document) or something like that. I am trying to remember what I read somewhere that it was an equivalent.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
GaryCommented:
If you are trying to set something to happen on document load then the shortcut is

$(function(){
...
})
0
 
metro156Author Commented:
I am very new to jQuery - so what is the long way ?

$( document ).ready()
0
 
metro156Author Commented:
www.jQuery.com  -------- shows it.
0
All Courses

From novice to tech pro — start learning today.