this is my html:
<ul> <li>Milk</li> <li>Bread</li> <li class='fade'>Chips</li> <li class='fade'>Socks</li> </ul>
this is my js function: -
$("li").hover( function () { $(this).append($("<span> ***</span>")); }, function () { $(this).find("span:last").remove(); } );
I want this type of output: -
<ul> <li>Milk</li> <li>Bread</li> <li class='fade'>Chips</li> <li class='fade'>Socks</li> <span> ***</span> </ul>
here i am trying to add one range in mouseover on li.
his work is beautiful.
but I want to add only once after the last li.
thanks.
source share