javascript - jQuery .click() not working on Android Lollipop -
i'm having troubles using .click()
function stuff need on cordova app.
the .click() function works on 4.x doesn't on 5.x did doing href="javascript:function()"
not recommended using csp enabled.
how can made .click()
function work on 5.x ?
the frameworks im using:
apache cordova 5.0 jquery mobile 1.4.5 jquery 1.11
my code:
<a href="javascript:chk('si');" class="chk chksi">si</a> <a href="javascript:chk('no');" class="chk chkno">no</a> <div class="clear"></div> <br /><br /> <a id="btnok" href="javascript:btnok();"><img src="img/registrar.png" class="center" width="75%"></a>
old code:
$(document).ready(function() { $(".chk").click(function() { $(".chk").removeclass('active'); $(this).addclass('active'); }); $("#btnok").click(function() { //stuff here }); });
thanks !
edit: didn't added $(document).ready()
function.
i not sure if have elsewhere, complete jquery functions:
$(document).ready(function(){ $(".chk").click(function() { $(".chk").removeclass('active'); $(this).addclass('active'); }); $("#btnok").click(function() { //stuff here }); });
Comments
Post a Comment