Q:: I use a jquery function in jquery file (included in the master pa开发者_运维知识库ge)::
$("li").mouseover(function(){
$(this).stop().animate({height:'230px'},{queue:false, duration:10, easing: 'easeOutBounce'})
});
I have many list items in my web site but I wanna this function to be applied only on a set of list items(in one ul)exists in the master page and not for all my menus I have.
how to fix this problem..
Give the ul
a class and use the descendent selector:
<ul class="bounce">
<li>Text</li>
etc...
</ul>
jQuery:
$('ul.bounce li').mouseover(function(){
// your code here
});
Don't select all li's, just select the ones you want?
$("#ulid li")...
精彩评论