JQuery  funtionality

Posted on 2014-02-21
Last Modified: 2014-02-21
Is     $()   equivalent to   $(window) ?
Question by:metro156
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
LVL 58

Expert Comment

ID: 39877595
$() does nothing as you are trying to attach it to nothing.

Author Comment

ID: 39877626
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.
LVL 58

Expert Comment

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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.


Author Comment

ID: 39877686
I am very new to jQuery - so what is the long way ?

$( document ).ready()
LVL 58

Accepted Solution

Gary earned 500 total points
ID: 39877695
That's the long way and the above is the shorthand way

Author Closing Comment

ID: 39877718  -------- shows it.

Featured Post

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction (All good things must come to an end ( original MySQL API ( has gone away, deprecated by PHP in Version 5.5, and removed from PHP in all current…
Introduction HyperText Transfer Protocol ( or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in… provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question