Solved

JQuery  funtionality

Posted on 2014-02-21
6
134 Views
Last Modified: 2014-02-21
Is     $()   equivalent to   $(window) ?
0
Comment
Question by:metro156
  • 3
  • 3
6 Comments
 
LVL 58

Expert Comment

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

Author Comment

by:metro156
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.
0
 
LVL 58

Expert Comment

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

$(function(){
...
})
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

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

$( document ).ready()
0
 
LVL 58

Accepted Solution

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

Author Closing Comment

by:metro156
ID: 39877718
www.jQuery.com  -------- shows it.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Foolproof security solutions has become one of the key necessities of every e-commerce or Internet banking website. If you too own an online shopping site then its vital for you to equip your web portal with customer security features that can allow…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

861 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