javascript - 一个接一个淡入p个标签

标签 javascript jquery html css

假设我有几个 p 标签:

<p>Style never met and those among great. At no or september sportsmen he perfectly happiness attending. Depending listening delivered off new she procuring satisfied sex existence. Person plenty answer to exeter it if. Law use assistance especially resolution cultivated did out sentiments unsatiable. Way necessary had intention happiness but september delighted his curiosity. Furniture furnished or on strangers neglected remainder engrossed.</p>

<p>Not far stuff she think the jokes. Going as by do known noise he wrote round leave. Warmly put branch people narrow see. Winding its waiting yet parlors married own feeling. Marry fruit do spite jokes an times. Whether at it unknown warrant herself winding if. Him same none name sake had post love. An busy feel form hand am up help. Parties it brother amongst an fortune of. Twenty behind wicket why age now itself ten.</p>

<p>For though result and talent add are parish valley. Songs in oh other avoid it hours woman style. In myself family as if be agreed. Gay collected son him knowledge delivered put. Added would end ask sight and asked saw dried house. Property expenses yourself occasion endeavor two may judgment she. Me of soon rank be most head time tore. Colonel or passage to ability.</p>

它们是 opacity:0,我想淡化它们,一个接一个,延迟 350 毫秒。

我该怎么做?

我所有的尝试

$.each($('p'), function(index,element){
    setTimeout(function(){ $(element).fadeIn(); }, 350);
});

同时淡出所有 p 标签。

最佳答案

应该这样做:

$("p").each(function(index) {
    $(this).delay(350*index).fadeOut(300);
});

关于javascript - 一个接一个淡入p个标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29529756/

相关文章:

javascript - 如何保护 public_html 中的文件夹免受访问者的侵害

javascript - 使用 html 输入重新加载文件

javascript - 没有插件的 wordpress 横幅 slider

javascript - 按即将到来的日期对日期为字符串的数组进行排序

javascript - 无法跨域追加本地存储数据

javascript - 以下nodejs代码之间的区别

javascript - 添加 Foundation Javascript 后,jQuery cookie 不再起作用

javascript - 如何定位已替换的元素

jquery - .toggle 来自 <a> 的 div 不工作

javascript - 滚动到时播放 HTML5 视频