Hello friends heres my code
Jquery
<script>
$(document).ready(function(){
$('#sitemap').children('li').addClass('cl');
$('.cl').mouseenter(function() {
$(this).css('background','#eee');
$(this).siblings('li').css('background','');
$(this).parents().css('background','');
})
$('.cl').mouseout(function() {
$(this).css('background','');
})
})
</script>
HTML
<ul id="sitemap">
<li>
one
<ul>
<li>two</li>
<li>two</li>
<li>two</li>
<li>two</li>
</ul>
</li>
<li>one</li>
<li>one</li>
</ul>
i am getting confused how to solve my problem actually i want a simple effect when mouseenter()
on <li>
background color will change .. but when I use nested list then its not working fine . I want when user hover the li the background color will change
Please help me
Thanks in advance :)