Answer the question
In order to leave comments, you need to log in
Why might jquery or javascript not work in a PhoneGap app?
A simple application was developed, the essence of which is to give a web page specified in advance with its contents through the phonegap platform, and in the absence of the Internet, write a warning about this and not display anything.
The strange thing is that the form validation (the simplest check of the field for fullness - it works in the browser, in the mobile browser = works, but in the application itself - no)
var emptyFields = $(":input.required").filter(function() {
// $.trim to prevent whitespace-only values being counted as 'filled'
return !$.trim(this.value).length;
});
// if there are one or more empty fields
if(emptyFields.length) {
// Тут код если поле не заполнено
}
else
{
// Тут код, если поле заполнено
}
if($.mobile.activePage.find('form#callform #code').val().length !=0) {...}
if($("#code").val().length !=0) {...}
if(document.getElementById('code').value !== "") {...}
if(code.length != 0) {...}
if($('#code').is(':empty')) {...}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question