English 中文(简体)
jquery 模式对话框对模式不起作用: true
原标题:jquery modal dialog doesn t work with modal:true
  • 时间:2012-05-25 15:32:52
  •  标签:
  • jquery

不知道我在这里做错了什么。 只是想把它变成一个模式对话框( 淡出页面内容 ) 。 我认为它和 < code> modal: true 一样简单。 当我单击图像时会出现一个对话框, 但不会淡出页面内容 。

<img src="images/help-35-30.png" alt="Help" class="helpdetails" style="padding-left:30px;"/>
<div class="dialogplease"><p>A comment</p></div>

<link rel="stylesheet" type="text/css" href="mycss/css/jquery-ui-1.8.20.custom.css" />
<script language="javascript" type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.20/jquery-ui.js"></script>       
<script>
$(function() {

$( .dialogplease ).dialog(); //init dialog
$( .dialogplease ).dialog( close ); //don t show dialog yet
$( .helpdetails ).click(function(e) {
    $( .dialogplease ).dialog( open )({
    modal: true
    });
});
});
</script>
最佳回答

语法是错误的。

您应该首先设定 :

$(function() {    
    $( .dialogplease ).dialog({modal:true,autoOpen:false}); //init dialog
    $( .helpdetails ).click(function(e) {
        $( .dialogplease ).dialog( open );
    });
});
问题回答

暂无回答




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签