0
我想要点击button
我的div与类text-internal
(具体一个 - 我我有多于一个div类text-internal
)获得max-height
。正如我所说的只有特定的div应该获得max-height
- 只有这个,这是在容器中,被点击,其他人,这是没有点击没有获得max-height
我不知道我是否正确解释清楚。jQuery,添加css规则到特定元素点击
<div class="single-offer-text">
<div class="text-internal">
<?php echo $params->get('mytextarea'); ?>
</div>
<button class="read-more">Read more</button>
</div>
JQUERY
jQuery('.read-more-hide').click(function() {
jQuery('.text-internal').css('maxHeight', '150px');
});
'内穿越到一个共同的父jQuery.prev'?这是新的还是你的意思是'jQuery(this).prev'? – llama
@llama是错字...谢谢 – charlietfl