[jQuery] Re: mouseover/mouseout vs. hover

2007-06-15 Thread Charlie Concepcion
Thanks! On Jun 14, 9:27 pm, "Brandon Aaron" <[EMAIL PROTECTED]> wrote: > $(document).ready is the original and is what happens behind the scenes ... > the shortcut is because we don't like typing. :) > > -- > Brandon Aaron > > On 6/14/07, Charlie Concepcion <[EMAIL PROTECTED]> wrote: > > > > > >

[jQuery] Re: mouseover/mouseout vs. hover

2007-06-14 Thread Brandon Aaron
$(document).ready is the original and is what happens behind the scenes ... the shortcut is because we don't like typing. :) -- Brandon Aaron On 6/14/07, Charlie Concepcion <[EMAIL PROTECTED]> wrote: Thanks Rafael... Thanks Everyone! It works great, man I'm loving this simple jQuery syntax.

[jQuery] Re: mouseover/mouseout vs. hover

2007-06-14 Thread Charlie Concepcion
Thanks Rafael... Thanks Everyone! It works great, man I'm loving this simple jQuery syntax. One more question though... why use the shorcut version vs. document.ready? I mean if this is the case why'd they even make document.ready? On Jun 14, 5:10 pm, "Rafael Santos" <[EMAIL PROTECTED]> wrote:

[jQuery] Re: mouseover/mouseout vs. hover

2007-06-14 Thread Karl Swedberg
Hi Charlie, Sorry I'm late to this thread. If you want more info on this, you can check out this entry I posted a while back: http://www.learningjquery.com/2007/02/quick-tip-set-hover-class-for- anything --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com

[jQuery] Re: mouseover/mouseout vs. hover

2007-06-14 Thread Rafael Santos
$(function(){ //shortcut for $(document).ready(){fn} $("#nav > li").hover(function(){ $(this).addClass("over"); }),function(){ $(this).removeClass("over"); }) }); 2007/6/14, Charlie Concepcion <[EMAIL PROTECTED]>: Ok I am new to this so here's my old code: $(document).ready(fu

[jQuery] Re: mouseover/mouseout vs. hover

2007-06-14 Thread Charlie Concepcion
Ok I am new to this so here's my old code: $(document).ready(function(){ $("#nav > li").mouseover(function(){ $(this).addClass("over");}) .mouseout(function(){ $(this).removeClass("over");}); }); I need that in hover version. I'm assuming it's supposed to be much shorter. On Jun

[jQuery] Re: mouseover/mouseout vs. hover

2007-06-14 Thread spinnach
charlie, (un)fortunately you'll have to do a bit of jquery magic, and i'd suggest using the hover method, where you define two functions, one for when mouse on, on for mouse off, like so: $('div').hover(function(){ //do your mouseover magic, eg: $(this).addClass('hover'); }, function() {

[jQuery] Re: mouseover/mouseout vs. hover

2007-06-14 Thread Rafael Santos
I think u can use both, hover and mouseover. jQuery uses javascript to treat it. 2007/6/14, Charlie Concepcion <[EMAIL PROTECTED]>: I'm new to jQuery and I have to say I love it! I hate javascript but now I like it cuz of query. Anyways enough of that :) I'm a CSS developer also. I know that

[jQuery] Re: mouseover/mouseout vs. hover

2007-06-14 Thread Jeffrey Kretz
The jQuery hover event is a javascript mouseover/mouseout event. You would do: $('element').hover(mouseOverEvent,mouseOutEvent); One of the really nice things built into the hover event, is it deals with parent/child elements cleanly. If you have a TD that contains a P and an A element, but th