jquery.click() not working in iOS

前端 未结 5 1352
既然无缘
既然无缘 2020-12-01 14:09

HTML:


      
      
5条回答
  •  不知归路
    2020-12-01 14:39

    Try to add a pointer cursor to the button and use .on to bind the click event.

    $('#button1').css('cursor','pointer');
    $(document).on('click', '#button1',  function(event) {
        event.preventDefault();
        alert('button1');
    });
    

提交回复
热议问题