在此代码中,我无法触发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/
谢谢