Tag: jquery mobile listview

JQM – 如何克服TypeError:t.data(…)未定义

在JQuery Mobile中,我创建了一个动态列表视图,该视图应根据单击的项目创建动态页面。 我设法启动并运行listview,但动态页面问题让我头疼,因为这个错误: TypeError:t.data(…)未定义 … ollapsiblebound“,!0).bind(”expand collapse“,function(t){var n = t.type ===”collapse … 每当我尝试导航到动态页面时,我就会在Firebug上得到这个。 我用来创建列表视图的代码是这个(它似乎工作正常): for (i=0; i<contacts_list.length;i++) { var patient = contacts_list[i]; output += "” + patient.name + “”; } } $(“#patlist”).append(output).listview(“refresh”); 我用来通过点击列表视图中的项目来创建页面的代码与此页面上的代码非常相似: http : //jquerymobile.com/demos/1.1.1/docs/pages/page-dynamic html的 $(document).bind(“pagebeforechange”, function (e, data) { // We only want to handle changePage() calls where the caller is // […]