[英]Animate on scroll once
Im using the fadethis js plugin and trying to make the animate on scroll only happen once, unsure on where im going wrong 我正在使用fadethis js插件并尝试使滚动动画仅发生一次,不确定我在哪里出错
http://jsfiddle.net/robcleaton/pLdwdzpz/ http://jsfiddle.net/robcleaton/pLdwdzpz/
JS JS
$(document).ready(function() {
$(window).fadeThis();
});
Simple one: 简单的一个:
$(window).fadeThis({
reverse:false
});
The documents specify this to set up the plugin: 文档指定了此设置插件:
<script>
$(document).ready(function() {
$(window).fadeThis({
baseName: "slide-",
speed: 500, // <a href="http://www.jqueryscript.net/animation/">Animation</a> speed in milliseconds.
easing: "swing", // Animation easing.
offset: 0, // <a href="http://www.jqueryscript.net/tags.php?/Scroll/">Scroll</a> offset, allowing to fire fading a little after or before the element appear.
reverse: true, // Make element disappear again when scrolled out, and fade again when scrolled in.
distance: 50, // Element distance to its emplacement, before animation.
scrolledIn: null, // Function to call when the element come in viewport.
scrolledOut: null // Function to call when the element go out of the viewport.
});
});
</script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.