0

这是我用来获得模态褪色效果的 javascript……它不起作用。我不知道为什么。它就像在一瞬间弹出一样。我希望它慢慢淡入,然后在关闭时淡出。

     <link href="Styles/myStyleSheet.css" rel="stylesheet" type="text/css" />
 <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
 <link href="Styles/Tab.css" rel="stylesheet" type="text/css" />

 <script type="text/javascript" language="javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
 <script type="text/javascript" language="javascript" src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>

var launch = false;
function launchModalV2() {
    launch = true;
}

function pageLoad() {
    if (launch) {
        //alert('1');
        // $find("mpeTest").show();
        $find('mpeTest').fadeIn();
    }
}

function launchModalV1() {
    alert('1');
    //$find('mpeTest').show();
    $find('mpeTest').fadeIn();
    return false;
}

CSS类:

.modalBackground
{
background-color: Black;
-filter: alpha(opacity=80);
-opacity: 0.6;
z-index: 10000;
}


<div style="position:absolute">
<act:ModalPopupExtender ID="mpeTest" BehaviorID="mpeTest" runat="server" TargetControlID="btnShowModal" PopupControlID="pnlPopup" OkControlID="btnOk" BackgroundCssClass="modalBackground">
</act:ModalPopupExtender>  
<asp:Button ID="btnOk" runat="server" Text="Ok" />
</div>

 <div>
    <asp:UpdatePanel runat="server" ID="pnlPopup">
    <ContentTemplate>
    <asp:Panel ID="pnlMyAddressBook" runat="server" BackColor="White" CssClass="roundcorner pnl">

    <table style="width:100%" cellspacing="0px" cellpadding="0px">..........
4

1 回答 1

0

您可以尝试使用$("#mpeTest").modal("show")尽管使用$find('mpeTest').fadeIn();

于 2013-04-08T05:47:01.250 回答