3
Contributors
2
Replies
14
Views
3 Years
Discussion Span
Last Post by cristi.s.marian
0

what is your specific question?
well if i could undestand the question
here a sample code:

<!DOCTYPE html>
<html>
<head>
<script>
function bigImg(x)
{
x.style.height="64px";
x.style.width="64px";
}

function normalImg(x)
{
x.style.height="32px";
x.style.width="32px";
}
</script>
</head>
<body>

<img onmouseover="bigImg(this)" onmouseout="normalImg(this)" border="0" src="smiley.gif" alt="Smiley" width="32" height="32">

<p>The function bigImg() is triggered when the user moves the mouse pointer over the image.</p>
<p>The function normalImg() is triggered when the mouse pointer is moved out of the image.</p>

</body>
</html>

Edited by joshuajames.delacruz: add new comment plus codes

0

If you just want to toggle classes on mouse onmouseover and remove you can use something like this with jQuery :

$(element).hover(function(){ $(this).classToggle('name_of_the_class');}});
you can do the same on function on mouse leave or blurr etc.

Hope this helps.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.