从JQuery对话框中删除类

时间:2015-04-29 16:23:06

标签: javascript jquery asp.net dialog removeclass

使用div ...                                                       

 $("#saveDialogSingleFeature").dialog({
        width: "auto",
        height: "auto",
        minHeight: "none",
        position: { my: "left"+ leftPosOfMessage + "% top+" + extraHeaderSize, at: "bottom", of: $("header") },
        show: { effect: "slideDown" },
        hide: true,
        closeOnEscape: true,
        buttons:[],
        dialogClass: "alert",

    }).parent().appendTo("form:first");

    //populate text of label
    $('#popUpLabel').text(popUpMessage);

    //remove titleBar
    $("#saveDialogSingleFeature").siblings('div.ui-dialog-titlebar').remove();

我可以删除titleBar,但我还想从对话框中删除ui-widget-content类。

//这些都不起作用

$("#saveDialogSingleFeature").siblings('ui-widget-content').remove();
$('saveDialogSingleFeature').removeClass("ui-widget-content");  

任何关于为什么

的想法

2 个答案:

答案 0 :(得分:1)

怎么样?

$('#saveDialogSingleFeature').removeClass("ui-widget-content"); 

remove方法将删除整个元素。我想你错过了#'#'通过id获取正确的元素。

答案 1 :(得分:1)

从父母那里删除它完成了技巧

set classpath=%classpath%;path_of_your_jar;