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

问题描述

这是(好的也许是第3部分)

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

这是一个工作示例:
这是一个较早的尝试,您可以看到这样做在选择第一个选项时:
但是使用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)动态删除元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 00:52