如何解决Bootstrap 表行单击适用于桌面,但不适用于 iOS
这是适用于桌面浏览器的代码,但不适用于 iOS。
tankLevelTable.on('click-row.bs.table',function (e,row) {
customer = row.customerName;
indexModal.find('.modal-title').text(customer + ' - Tank Options');
indexModal.modal('show');
});
我已经尝试在页面中的各种 HTML 元素上放置一个 onclick = "void(0)",但它仍然不起作用。为事物分配常规点击事件在 iOS 上确实有效,只是不是这个特定的引导表事件。有人有什么建议吗?
此外,这里是 HTML:
<div onclick="alert('hi there');" >
<table id="tankLevelTable" class="display table table-bordered table-striped" data-url="https://xxx.xxx.com/customertanklevel" data-row-style="rowStyle" data-toggle="table">
<thead>
<tr>
<!--<th data-field="State" data-checkbox="true" data-formatter="test"></th>-->
<th data-field="customerName">Customer</th>
<th data-field="tankLevelString">Gallons</th>
<th data-field="fuelType">Fuel</th>
<th data-field="fuelHeightString">Height</th>
</tr>
</thead>
</table>
</div>
在桌面站点上,当单击一行时,警报和行单击事件都会触发(先发出警报,然后单击行)。但在 iPhone iOS(和 Android)上,只会触发警报。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。