如果您在输入中没有写任何内容,但我无济于事,我试图使Jquery步骤不前进。
http://www.jquery-steps.com/Examples
if (newIndex === 2 && $("#Rua").val() == "") {
return false;
}
$(document).ready(function() {
$("#wizard").steps({
headerTag: "h2",
bodyTag: "section",
transitionEffect: "slideLeft",
stepsOrientation: "vertical",
labels: {
current: "current step:",
pagination: "Pagination",
finish: "Finalizar",
next: "Confirmar",
previous: "Voltar",
loading: "Carregando ..."
},
onStepChanging: function(event, currentIndex, newIndex, cepError) {
if (currentIndex > newIndex) {
return true;
}
if (newIndex === 1) {
return true;
}
if (newIndex === 2 && $("#Rua").val() == "") {
return false;
}
}
}
)
});