Jquery On Dynamic Unorder list On Mouse Hover Change Style of List Item
Hello Friends,
I had been struggle with this issue for 1 Day for find solution of it. after 1 Day struggle got the solution of It. & when see solution at that time think that If I have got this from Internet available easily from post or website or any reference then I don't waste time.
But Don't Worry you don't need to waste your time as like me. So, I am posting this to save your important time.
Lets Discuss on topic..
Use Below Code When your unorder list is Dynamic...
Where
listLive - is id of ul (Unorder list)
selected - is css class
you can define selected as
Cheer up ;)-
I had been struggle with this issue for 1 Day for find solution of it. after 1 Day struggle got the solution of It. & when see solution at that time think that If I have got this from Internet available easily from post or website or any reference then I don't waste time.
But Don't Worry you don't need to waste your time as like me. So, I am posting this to save your important time.
Lets Discuss on topic..
Use Below Code When your unorder list is Dynamic...
jQuery('#listLive>li').live('mouseover', function() { jQuery(this).addClass('selected'); });
jQuery('#listLive>li').live('mouseout', function() { jQuery(this).removeClass('selected'); });
Where
listLive - is id of ul (Unorder list)
selected - is css class
you can define selected as
.selected
{
background-color: blue;
}
Cheer up ;)-
Comments