Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 145
  • Last Modified:

JQuery funtionality

Is     $()   equivalent to   $(window) ?
0
metro156
Asked:
metro156
  • 3
  • 3
1 Solution
 
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
 
GaryCommented:
If you are trying to set something to happen on document load then the shortcut is

$(function(){
...
})
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
metro156Author Commented:
I am very new to jQuery - so what is the long way ?

$( document ).ready()
0
 
GaryCommented:
That's the long way and the above is the shorthand way
0
 
metro156Author Commented:
www.jQuery.com  -------- shows it.
0

Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now