0

내부에 jquery 데이터 테이블을로드하는 jquery 모달 대화 상자가 있습니다. 나는 중앙에 표시 할 대화 상자를 만들지 않습니다 (현재는 계속 유지) & 해결책은 무엇입니까? 나는 위치를 시도했다 : 센터,하지만 그것은 작동하지 않습니다.jQuery 대화 상자 - DataTables를 사용하는 대화 상자가 가운데에 배치되지 않았습니다.

// Dialog for food details 
    var $detaildialog; 
    $detaildialog = $('#detaildialog').dialog({ 
     autoOpen: false, 
     title: 'Food Details', 
     modal: true, 
     position: 'center', 
     width: 'auto', 
     height: 'auto' 

    }); 

    //Call Details action to display the food details 
     var url = '/Food/Details?cid=' + id; 

     //Use .load callback function to ensure details is loaded before dialog open 
     $detaildialog.load(url, function() { 
      $('#loading').hide(); 
      $detaildialog.dialog('open'); 
     }); 

그리고 여기 내 데이터 테이블 HTML의 일부를 보여주는 : 내 스크립트는 다음과 같다

<div id="tableplaceholder"> 
<table id="stocktable" class="pretty"> 
    <thead> 
     <tr> 
      <th> 
       Name 
      </th> 
      <th> 
       Amount 

과 CSS :

#tableplaceholder 
{ 
    width: 100%; 
} 

어떤 의견을 보내 주셔서 감사합니다 ... 여기에 도움이 필요 ......

+0

우리가 문제를 볼 수있는 링크가 있습니까? –

+0

아니요 ... 어떻게해야합니까? – shennyL

+0

사이트에 링크하거나 http://jsfiddle.net/에서 문제를 재현하십시오. –

답변

0

비록 내가 왜 그런지 모르겠지만, 대화 상자 폭을 고정시킨 후에, di 알록은 중심에있다. 같은 상황에 처한 모든 사람을 위해 여기에 게시하십시오. 감사!

관련 문제