mardi 30 octobre 2018

jquery check if 3 checboxes are checked not working on iphone

so im currently busy working on website where people can vote on 3 ideas.
I made a function that the vote submit button is disabled when someone hasnt selected 3 ideas to vote on, and when he/she does select 3 the submit becomes available.
the problem is its working perfectly fine on android phones but on iphones it stays disabled when i select 3 but becomes available when i switch from 3 to 2 or 4.
But that isnt whats supposed to happen anyone got a clue of what could be the problem.

down here is my function in JQuery

$('body').on('change','#nieuwetrofeestemmen_table',function () {
   var checked = getCheckedRows('nieuwetrofeestemmen_table');
   if(checked.length < 3 || checked.length >3){
       $('.btnStemmen').prop('disabled', true);
   }
   else {
       $('.btnStemmen').prop('disabled', false);
   }
});

thanks in advance



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire