Solved

JQuery  funtionality

Posted on 2014-02-21
6
126 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This video teaches users how to migrate an existing Wordpress website to a new domain.
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…

867 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now