jquery移动复选框列表点击事件未触发

时间:2016-03-03 10:32:26

标签: javascript jquery html cordova jquery-mobile

在此代码中,我无法触发tap或taphold事件。

HTML

    <div data-role="content">
    <form>
      <fieldset data-role="controlgroup">
          <legend>Vertical:</legend>
          <input name="checkbox-v-2a" id="checkbox-v-2a" type="checkbox">
          <label for="checkbox-v-2a">One</label>
          <input name="checkbox-v-2b" id="checkbox-v-2b" type="checkbox">
          <label for="checkbox-v-2b">Two</label>
          <input name="checkbox-v-2c" id="checkbox-v-2c" type="checkbox">
          <label for="checkbox-v-2c">Three</label>
      </fieldset>
    </form>
  </div>

JAVASCRIPT

  $('input:checkbox').bind( "tap", function() {
  alert("Test message");
  });

这是一个小提琴  https://jsfiddle.net/frizzo28/jkfjrn0b/3/

谢谢

0 个答案:

没有答案