Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/79.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
Jquery 到达特定div时的动画_Jquery_Html - Fatal编程技术网

Jquery 到达特定div时的动画

Jquery 到达特定div时的动画,jquery,html,Jquery,Html,当我到达页面的第1部分和第2部分时,我希望具有fadeIn效果。我找到了一个解决方案,但它只在一个分区中提供动画。我对jquery是新手,我一直在尝试在两个分区中都提供动画 以下是我的html代码: <div></div> <h1 id="scroll-to1">PART 1</h1> <div></div> <h1 id="scroll-to">PART 2</h1> Jquery插件在这方面很有

当我到达页面的第1部分和第2部分时,我希望具有fadeIn效果。我找到了一个解决方案,但它只在一个分区中提供动画。我对jquery是新手,我一直在尝试在两个分区中都提供动画

以下是我的html代码:

<div></div>
<h1 id="scroll-to1">PART 1</h1>
<div></div>
<h1 id="scroll-to">PART 2</h1>

Jquery插件在这方面很有用

$('.entry').waypoint(function() {
   alert('The element has appeared on the screen.');
});

Jquery插件在这方面很有用

$('.entry').waypoint(function() {
   alert('The element has appeared on the screen.');
});

我知道这个插件。我不想使用pluginI,因为我知道这个插件。我不想使用插件