English 中文(简体)
j Query UI 糖尿病
原标题:jQuery UI Dialog not showing correctly

I m using jQuery UI 1.8.19 and Twitter Bootstrap 2.0.3 in a site I m developing. I want to show a modal dialog when click in a Delete and for this I do that:

 <div id="dialog-confirm" title="<?php echo lang("event:delete_confirm_title") ?>">
      <p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span><?php echo lang( event:delete_confirm_content ) ?></p>
 </div>

The JS to fire the event is this:

 $(function() {
    $("#delete").click(function(){
        $( "#dialog-confirm" ).dialog({
            resizable: false,
            height:140,
            modal: true,
            buttons: {
                "<?php echo lang( event:delete ) ?>": function() {
                    $( this ).dialog( "close" );
                },
                "<?php echo lang( global:cancel_label ) ?>": function() {
                    $( this ).dialog( "close" );
                }
            }
        });
    });
});

For some reason the modal dialog is always showed at the end of the page when it shouldn t be I think and when I click the element the dialog appears but the page is redirected instantaneously to my home page and didn t know the cause because I don t have redirects in any place and also there are no forms there. Any advice or help on this? Best regards

最佳回答

您应加上<条码>显示:无至您的方言四分之四,以在启动时展示。

如果在你点击纽顿时将这一页送至家里,那么,如果该页有一份分机,例如为了避免发射正常的点击事件手,你可能要检查一下底线的哪一类,并用<代码>填满其功能:

$(function() {
    $("#delete").click(function(e){
        $( "#dialog-confirm" ).dialog({
            resizable: false,
            height:140,
            modal: true,
            buttons: {
                "<?php echo lang( event:delete ) ?>": function() {
                    $( this ).dialog( "close" );
                },
                "<?php echo lang( global:cancel_label ) ?>": function() {
                    $( this ).dialog( "close" );
                }
            }
        });
    e.preventDefault();
    });
});

Edit :根据斯科特建议进行的修改

问题回答

我也是这样。 我知道只有一个原因。 诊断中心档案没有装上。

See my SO Question: position:fixedages in IE9





相关问题
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.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签