Created
March 13, 2019 06:01
-
-
Save thetwopct/6cdd31e956298918ba714c3255c1eb61 to your computer and use it in GitHub Desktop.
Hide Up/Down Navigation Arrows on First and Last slides on fullpage.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new fullpage("#fullpage", { | |
navigation: false, | |
controlArrows: false, | |
afterLoad: function(origin, destination, direction) { | |
var loadedSection = this; | |
if (destination.isFirst) { | |
$("#moveUp").hide(); | |
} else { | |
$("#moveUp").fadeIn(); | |
} | |
}, | |
onLeave: function(origin, destination, direction) { | |
if (destination.isLast) { | |
$("#moveDown").fadeOut(); | |
} else { | |
$("#moveDown").fadeIn(); | |
} | |
} | |
}); | |
$(document).on("click", "#moveUp", function() { | |
fullpage_api.moveSectionUp(); | |
}); | |
$(document).on("click", "#moveDown", function() { | |
fullpage_api.moveSectionDown(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment