Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

JQuery  funtionality

Posted on 2014-02-21
6
Medium Priority
?
142 Views
Last Modified: 2014-02-21
Is     $()   equivalent to   $(window) ?
0
Comment
Question by:metro156
[X]
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
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
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

 

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 2000 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

Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

Question has a verified solution.

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

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…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Wufoo.com 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.
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

721 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