【发布时间】:2013-01-09 10:48:32
【问题描述】:
如何绑定点击collapsible-set的一个元素?
<div data-role="content">
<div data-role="collapsible-set" data-theme="d" data-content-theme="d">
<div data-role="collapsible" id="expand">
<h3>header</h3>
</div>
</div>
</div>
试试这个:
$(document).on('click', '#expand', function (e) {
e.stopImmediatePropagation();
e.preventDefault();
console.log('ekb'); // my stuff
});
【问题讨论】:
-
它似乎工作正常。你希望它做什么?
-
它不显示 console.log
-
单击“hh”部分会在 osx 的 chrome 中的两个 safari 中记录“ekb”。你用的是什么操作系统/浏览器?
-
你的小提琴很好..它显示了 chrome 中的 console.log..
-
我需要按标题点击
标签: jquery jquery-mobile click