小编G.M*_*des的帖子

关闭按钮单击事件的模式对话框

我有一个模态窗口,在下拉列表中点击一个项目时打开.按下按钮,我无法实现关闭对话框.

 var $that = this;
 $("#btncart_cancel").on("click", function () {
      ///// ***********close the dialog *************** 
      /// tried this but not working
      $that.dialog("close");
 });
Run Code Online (Sandbox Code Playgroud)

我的代码:

$(".ddlCart li").click(function (e) {
$('#actionsCart').slideToggle();

var ddlselectedVal = $(this).attr('id');
var selectedListinsCount = selected_Listings.length;
var SelectedMlsnums = selected_Listings.join();
var agentId = $("#AgentId").val();

var EnvironmentURL = $("#EnvironmentURL").val();

var autoUrl = "/Stats/SearchContacts";
var Action = "PreAddToCart"

var postData = {
    AgentId: agentId,
    Mlsnums: SelectedMlsnums,
    ActionTypeValue: Action
};
var $that = this;
var close = function (event, ui) {
    $(this).dialog("destroy");
} …
Run Code Online (Sandbox Code Playgroud)

javascript jquery modal-dialog

2
推荐指数
1
解决办法
5万
查看次数

标签 统计

javascript ×1

jquery ×1

modal-dialog ×1