jQuery: swap text and return (loop)
I wanna ask how I can swap the first li text "Home" to "Menu" on hover and when I re-hover the li, it gets back to "Home" and this process goes on.
Many thanks for any help!
- <ul>
<li><a id="translateMenulist" href="#/">Home</a></li>
</ul>
<script>
$("li:contains('Home')").hover (
function () {
$(this).html("<span> Menu</span>");
}
);
</script>