Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 切换效果阅读更多_Javascript_Jquery - Fatal编程技术网

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');
});