I want to hide and show a <p> tag when mouse over it, but my code only can hide the p tag and never show it again ,why?
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script>
$(function(){
$("#mouse").mouseover(function(){
if($(this).is(':hidden')){
$(this).show("normal");
}
else{
$(this).hide("slow");
}
});
});
</script>
</head>
<body bgcolor="white">
<p id="mouse">
test
</p>
</body>
</html>
Because you will not have a mouseover event on a hidden p.