Jquery ui 如何在jquery中引用当前的p标记
我试过了 在html中作为Jquery ui 如何在jquery中引用当前的p标记,jquery-ui,jquery,Jquery Ui,Jquery,我试过了 在html中作为 <?php while (have_posts()) :the_post(); ?> <div class="product-content"> <?php if ($len > 122): ?> <?php echo $sub ."........"; ?> <p class="invisible"><?php echo $cont; ?> </p>
<?php while (have_posts()) :the_post(); ?>
<div class="product-content">
<?php if ($len > 122): ?>
<?php echo $sub ."........"; ?>
<p class="invisible"><?php echo $cont; ?> </p>
<?php else: ?>
<?php echo $sub ?>
<?php endif; ?>
</div>
<?php endwhile; ?>
或
你为什么不直接打电话呢
$('.product-content').click(function(){
$('.invisible').text();
});
你为什么不直接打电话呢
$('.product-content').click(function(){
$('.invisible').text();
});
尝试使用以下方法:
$(this).children("p.invisible").text()
尝试使用以下方法:
$(this).children("p.invisible").text()
我建议更好地缩进PHP代码,我建议更好地缩进PHP代码,因为不搜索整个DOM要快得多…?因为不搜索整个DOM要快得多。。。?
$(this).children("p.invisible").text()