05.01.2022, 15:00
This will make swipe work only inside current level plans:
Code:
$(function() {
showPrevNextPlan = function(next) {
var el = $('#menu-plan-' + currentPlanId);
var nel = next ? el.next() : el.prev();
if (!nel.length || nel.hasClass('level')) {
el = next ? el.prevUntil('.level') : el.nextUntil('.level');
nel = $(el.get(-1));
}
nel.find('.a').click();
};
});