Did you place your code inside jQuery's document ready function?
$(document).ready(function() {
$("#section1").hover(function(){
$("p.sec-ia").addClass("unhide").show("slow");
},function(){
$("p.sec-ia").removeClass("unhide").hide("fast");
});
});
The above worked for me, assuming .unhide was a "display" style and was used
to display a <p> with class of "sec-ia".
_____
SEAN O
http://www.sean-o.com
gandalf458-2 wrote:
>
>
> I'm trying my first simple jQuery task, a mouseover event to display a
> box with some text.
>
> $("p.sec-ia").addClass("unhide").show("slow");
>
> works fine but when I add the mouseover
>
> $("#section1").hover(function(){
> $("p.sec-ia").addClass("unhide").show("slow");
> },function(){
> $("p.sec-ia").removeClass("unhide");
> });
>
> it doesn't do anything. I don't know if it's because my p.sec-ia isn't
> in the #section1. Can anyone give me a clue, please? Thanks.
>
>
--
View this message in context:
http://www.nabble.com/My-first-jQuery-tp17643861s27240p17645936.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.