iPhone Jquery run function on confirm = true

I'm using html / jquery to make my phone list, and I want to have a confirm dialog to do the action, but even if I tap cancel, the action is fired... also, is there any chance of using jquery and cycript together? Thanks $(".btns_numeros").click(function() { confirmacao($(this).attr('id')); }); // function confirmacao(numero) { var resposta = confirm ("Ligar para "+numero+" ?"); if (resposta) { var ligar = ""; window.location.href = ligar; } else { event.preventDefault(); return false; } }

以上就是iPhone Jquery run function on confirm = true的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准