javascript - How to validate current section in JQuery fullpage plug-in? -
javascript - How to validate current section in JQuery fullpage plug-in? -
i'm using jquery fullpage.js fullpage.js poll form have several levels. how can validate (by regex) current section/level before go next section mouse wheel up/down , if validation conditions not correct, prevent going next section , show alert?
i used code doesn't work correctly:
$(document).ready(function () { $('#rollover').fullpage({ anchors: ['l1', 'l2', 'l3','l4'], menu: '#lev_num', scrolloverflow: true, onleave: function (index) { $.fn.fullpage.moveto(index); } }); });
you delete .fp-section class of section below plugin thinks form in latest section. can using afterrender callback. then, in whichever action utilize validate form, if correct, add together fp-section class 1 time again next section. if want validation mousewheel have create own mousewheel handler...
javascript jquery regex fullpage.js
Comments
Post a Comment