<ul>
  li><span></span></li>

  li><span></span></li>
</ul>

如上所示 , 如果要选择li 下的span jQuery 的写法如下:

$('li').mouseleave(function(){
  $(this).find('span').css('left','100%');
});

注意find的用法:

  $(this).find('子级')

相关文章:

  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
  • 2021-05-20
  • 2021-12-16
  • 2022-12-23
  • 2021-04-07
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-20
  • 2021-05-11
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案