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:
Thanks Rafael...
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
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
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()
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 14,
$(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:
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:
$(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.
8 matches
Mail list logo