Next code:
<script>
$(document).ready(function() {
$("#inicio").hover(function() {
$("#inicio").addClass("fogo");
$("#inicio").removeClass("fogo");
});
});
</script>
And the HTML:
<li><a id="inicio">Inicio</a></li>
In class * (.fire) *, I inserted these CSS codes, basically it displays a gif and positions it.
<style>
.fogo {
background-image: url("http://www.bestgraph.com/gifs/paysages/flammes/flammes-10.gif");
background-position: 0px center;
}
</style>
Forget stylization, I took the css out to make it easier to see the code. I tested here, and by hovering over "a", it gets a class, empty, getting something like:
<li><a id="inicio" class="">Inicio</a></li>
What do I do to simply put the .fire class in the element, and when I quit the mouse pull it out? For me basically using hover, and two functions, the first for mouse input on the element, and another working on the output .. Thanks!