【发布时间】:2013-03-12 08:53:51
【问题描述】:
我希望每次用户单击一行时在 jQuery 列表视图中切换一个图标。
Here is the complete source code.
以下代码似乎不起作用:
$(this).remove('img');
我也试过了:
$(this).remove('icon');
有什么想法吗?
【问题讨论】:
标签: jquery image listview jquery-mobile
我希望每次用户单击一行时在 jQuery 列表视图中切换一个图标。
Here is the complete source code.
以下代码似乎不起作用:
$(this).remove('img');
我也试过了:
$(this).remove('icon');
有什么想法吗?
【问题讨论】:
标签: jquery image listview jquery-mobile
【讨论】:
remove() 运行正常,但正如this bug report 显示的那样令人困惑。
.hello 的文档$('div').remove('.hello'); means remove the div`。参数充当filter(不是selector)。您的代码 $(this).remove('img'); 表示从 $(this) 的数组中过滤具有 img 标记的元素并仅将其删除。