我想在下面的html中选择p元素
<div class="parent">
  <p>Stg</p>
</div>在这个JS中
$('.parent').hover(
  function() {
    $(this.p).aFunction(){
  };
});我找不到正确的选择器。
发布于 2014-09-18 10:59:17
要做到这一点,有几种方法:
查找():
$(this).find('p').func();儿童():
$(this).children('p').func();上下文中的选择器:
$('p', this).func();https://stackoverflow.com/questions/25910697
复制相似问题