При нажатии кнопки; , если все текстовые поля не пусты на странице, он будет на следующей странице. Я сделал контроль, он работает. Но как я могу ориентироваться на другой странице с jquery?Ориентация страницы с помощью JQuery?
$(document).on("pageinit", "#registerPage1", function() {
$(".nextBtn").click(function() {
if ($(".txt").val().lenght != 0) {
// i want to write codes for orientation registerPage1 to registerPage2 in here
}
$(".txt").each(function() {
if ($(this).val().length == 0 && $(this).next().attr('class') != 'nullInputMsg') {
($(this)).after('<div class="nullInputMsg">this field is required!</div>');
}
else if ($(this).val().length != 0 && $(this).next().attr('class') == 'nullInputMsg')
$(this).next().remove();
});
});
});
Да, я сделал с подобными мыслями : $ x = "true"; $ (". RequiredText"). Each (function (i) { if (! $ (This) .val(). Length) $ x = "false"; }) if ($ x == "true") // команды }); }); }); – ebruszl