Jquery mobile app works on the desktop, doesnt work on mobile
I have a problem, I am making a jquery mobile web app for android, and on
one page I cant fire button "Proveri" on mobile devices(iPhone 5 and Asus
Pad HD 7 tested).
The link is here
Chek HTML on the source code of this page.
JS:
var film = new Array("balkan ekspres","balkan expres");
$(document).ready(function() {
$('.pomoc').hide();
if(typeof(Storage)!=="undefined")
{
//ucitavanje pomoci
$('.btnpomoc').click(function(){
$('.pomoc').slideDown();
});
$("#bb").text(localStorage.bodovi);
if(localStorage.prviprvo.length>3){
$("#imefilma").val(localStorage.prviprvo);
$("#proveri").parent('.ui-submit').addClass("ui->disabled");
$("#proveri").prev('span.ui-btn->inner').find('span.ui-btn-text').text("Pogoðeno");
}
else{
$(".proveri").on('tap', function(){
var imef = >$("#imefilma").val().toLowerCase();
var pogodak;
$.trim(imef);
for(i=0;i<=film.length-1;i++){
if(imef==film[i]){
pogodak = true;
}else{
pogodak = false;
}
}
if(pogodak==true){
var prvoSlovo = imef.substr(0,1);
var ostatak = imef.substr(1);
var novoIme = >prvoSlovo.toUpperCase() + ostatak;
$("#imefilma").val(novoIme);
alert("Taèno!");
//registrujemo da je ovo pitanje
localStorage.prviprvo = novoIme;
localStorage.bodovi = >Number(localStorage.bodovi) +
10;
$("#bb").text(localStorage.bodovi);
}else{
alert("Netaèno!");
}
});
}
}
else
alert("Dogodila se greska");
});
No comments:
Post a Comment