JQM(jQueryMobile)动态删除元素 [英] JQM (jQueryMobile) Dynamically removing elements

查看:147
本文介绍了JQM(jQueryMobile)动态删除元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是这个问题的第2部分(可能是第3部分)

This is part 2 of this question (ok maybe part 3)

这是一个工作示例: http://jsfiddle.net/UcrD8/63/
这是一个较早的尝试,你可以看到这一点,当选择第一个选项: http://jsfiddle.net/UcrD8/4/
但是使用JQM它使用它作为选项的标签和它不可选择

Here is a working example: http://jsfiddle.net/UcrD8/63/ Here is a earlier attempt and as you can see this works when selecting the first option: http://jsfiddle.net/UcrD8/4/ But using JQM it uses this as a label for the options and it is not selectable

添加新的选择选项的功能正在工作,但如果我想删除选定的选项,这不工作。

The functionality to add a new select option is working but if I wanted to remove a selected option, this is not working.

更新:

我注意到select元素正在删除,但jQM的添加语法仍然显示:

I did notice that the select element is being removed but jQM's added syntax is still displaying:

<div class="ui-select">
    <div data-theme="c" class="ui-btn ui-btn-icon-right ui-btn-corner-all ui-shadow ui-btn-down-c ui-btn-up-c">
        <span class="ui-btn-inner ui-btn-corner-all">
            <span class="ui-btn-text">Remove Selected Option</span>
            <span class="ui-icon ui-icon-arrow-d ui-icon-shadow">
            </span>
        </span>
    </div>
</div>

需要将其删除

推荐答案

好了,因为jQM已经更新了几次,我可以得到这个工作

Well since jQM has been updated several time, I was able to get this working

  • http://jsfiddle.net/6fFLb/7/

这篇关于JQM(jQueryMobile)动态删除元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆