开发者

JQuery Div Closing on click

I am using JQuery to insert html in a div using $('#myDiv').show(); on a click of a checkbox. But whenever I click somewhere in the Div that is not an object (Dropdownlist or a Textbox开发者_C百科 etc.) . The Div seems to be closing. Is there a property in Jquery to prevent this?.

    $(".mycheckboxDiv input[@type=checkbox]").click(
      function () {
        // Insert code here 
        if ($(this).attr('checked')) {
                var y = $(this).attr('value');
                var divname = "reactiondiv" + y;
                $('#' + divname).show("1000");
                getData('ajaxService.asmx/GetControlHtml1', 'MyService/x/UserControls/SeverityandReactionWidget.ascx', divname, y, hiddendivname);
        }
    });

getData is a function that puts the HTML. Which has the $('#divName').html(eval(msg)) (I am using $.ajax();)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜