【问题标题】:Jquery UI dialog, remove scrollbar if bootstrap columns are usedJquery UI 对话框,如果使用引导列,则删除滚动条
【发布时间】:2018-07-14 15:42:53
【问题描述】:

我创建了这个fiddle 来显示我的问题。

难道不能在 jquery ui 对话框中使用引导列而不出现这个烦人的水平滚动条吗?

Soory, I don't know how to insert the fiddle code with the right depencies in the right way.

【问题讨论】:

    标签: jquery-ui twitter-bootstrap-3 jquery-ui-dialog


    【解决方案1】:

    先想再写……

    只需删除“行” div 即可。

    Look here.

    Soory, I don't know how to insert the fiddle code with the right depencies in the right way.

    【讨论】:

      【解决方案2】:

      只需在对话框容器 div 中添加“style='overflow-x:hidden;'”即可。

      function CreateBusinessDialog(action, formId) {
      var contId = 'dlgcont_' + GetUidString();
      var container = document.createElement('div');
      container.setAttribute('id', contId);
      container.setAttribute('style', 'overflow-x:hidden;');
      document.body.appendChild(container);
      
      $('#' + contId).dialog({
          autoOpen: false,
          modal: true,
          title: 'Create New',
          width: '75%', //$(window).width() - 150,
          height: $(window).height() - 150,
          open: function (event, ui) {
              $(this).load(action);
          },
          buttons: [{
              text: 'Create',
              click: function () {
                  var form = $('#' + formId);
                  form.validate();
                  if (form.valid()) {
                      //alert('valid');
                      form.submit();
                  }
              }
          }, {
              text: 'Close',
              click: function () {
                  $(this).dialog('close');
              }
          }],
          close: function () {
              container.parentNode.removeChild(container);
          }
      });
      
      $('#' + contId).dialog('open');
      

      }

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2010-12-09
        • 1970-01-01
        • 2023-03-21
        • 2011-10-12
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多