New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
moveTo within onLeave #2052
Comments
Please provide an isolated reproduction of the issue in jsfiddle or codepen. |
I misread it. Here's a solution for the moment: http://jsfiddle.net/97tbk/1292/ //IE < 10 pollify for requestAnimationFrame
window.requestAnimFrame = function(){
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(callback){ callback() }
}();
$('#fullpage').fullpage({
sectionsColor: ['yellow', 'orange', '#C0C0C0', '#ADD8E6'],
onLeave: function(index, nextIndex, direction) {
var leavingSection = $(this);
requestAnimFrame(function(){
if (index == 2 && direction == 'down') {
$.fn.fullpage.moveTo(4);
}
});
}
}); |
Ok, thank you for your help! It was working in 2.7.9 without any problems, so will it be working in a future release? |
This jsfiddle proves it didn't. It is using 2.7.9.
If I get to find a good solution for it, yes. Otherwise nop :) |
Ok, I'm sorry! I tested with this CDN link https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.7.9/jquery.fullPage.min.js. |
Hi Alvaro,
since v2.8.1 it seems the method "moveTo" is not working within callback "onLeave".
With above code nothing happens in section 2, cannot scroll down to section 3 or 4...
Am I missing something or is this somehow a bug?
The text was updated successfully, but these errors were encountered: