Reputation: 1505
Im using the fadethis js plugin and trying to make the animate on scroll only happen once, unsure on where im going wrong
http://jsfiddle.net/robcleaton/pLdwdzpz/
JS
$(document).ready(function() {
$(window).fadeThis();
});
Upvotes: 0
Views: 802
Reputation: 7218
$(document).ready(function() {
$(window).fadeThis({
reverse: false;
});
});
Upvotes: 1
Reputation: 14417
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>
Upvotes: 2