[jQuery] Problem with hover
Hi,
I'm having trouble with $(...).hover, here is a simple example :
<html>
<head>
<script src="js/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).onready(function() {
$("#main").hover(alert("in"),alert("out"));
});
</script>
</head>
<body>
TEXT BODY
<div id="main" style="border: 2px solid yellow">
MAIN
</div>
TEXT BODY
</body>
</html>
First, I'm getting the two message boxes when the document load, why ?
I'm getting the same sort of problem when I use $(...).click, the function defined inside click is executed when the function where I define the bind is executed.
And when I move my mouse inside or outside the div, nothing happens...
I'm using the latest jquery from <a href="http://jquery.com/src/latest/">http://jquery.com/src/latest/</a>
Sorry for my english, it's not my native language.
Thanks for your help
PICA Frédéric
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/