【问题标题】:jQuery draggable selector not workingjQuery可拖动选择器不起作用
【发布时间】:2013-07-11 12:29:24
【问题描述】:

我想拖放我的指定元素,但可拖动选择器效果不佳。

        $("#lessonTeacher p").draggable({
                revert: true,
                helper: 'clone',
                containment: "#timeTable"
        });

在课程Teacher div 中有许多'p' HTML 标签。我想拖动“p”项目。但是这段代码不起作用。

【问题讨论】:

  • $(".lessonTeacher p") 可以工作... $('#id') 对一个元素只工作一次

标签: jquery jquery-ui user-interface jquery-ui-draggable


【解决方案1】:

试试

  <div id="draggable" class="ui-widget-content">
        <p>Drag me around</p>
    </div>

    $( "#draggable" ).draggable();

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-02
    • 2010-10-18
    • 2012-03-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多