Javascript 切换效果阅读更多
Javascript 切换效果阅读更多,javascript,jquery,Javascript,Jquery,问题是显而易见的。我需要使用toogle效果在第一段后显示隐藏所有p。使用hide和toggle: $('.post-content p:not(:first-child)').css('display', 'none'); $(".more").click(function () { $('.post-content p:not(:first-child)').css('display', 'block'); }); 使用隐藏和切换: $('.post-content p:not(
问题是显而易见的。我需要使用toogle效果在第一段后显示隐藏所有
p
。使用hide
和toggle
:
$('.post-content p:not(:first-child)').css('display', 'none');
$(".more").click(function () {
$('.post-content p:not(:first-child)').css('display', 'block');
});
使用
隐藏
和切换
:
$('.post-content p:not(:first-child)').css('display', 'none');
$(".more").click(function () {
$('.post-content p:not(:first-child)').css('display', 'block');
});
使用
隐藏
和切换
:
$('.post-content p:not(:first-child)').css('display', 'none');
$(".more").click(function () {
$('.post-content p:not(:first-child)').css('display', 'block');
});
使用
隐藏
和切换
:
$('.post-content p:not(:first-child)').css('display', 'none');
$(".more").click(function () {
$('.post-content p:not(:first-child)').css('display', 'block');
});