浏览代码

Put tooltip/popover on bottom if there is not enough space on top

Ludovic Perrine 11 年之前
父节点
当前提交
339771c33c
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/js/bootstrapValidator.js

+ 2 - 2
src/js/bootstrapValidator.js

@@ -1081,7 +1081,7 @@ if (typeof jQuery === 'undefined') {
                                 ? $icon.css('cursor', 'pointer').tooltip('destroy').tooltip({
                                     container: 'body',
                                     html: true,
-                                    placement: 'top',
+                                    placement: 'auto top',
                                     title: $allErrors.filter('[data-bv-result="' + that.STATUS_INVALID + '"]').eq(0).html()
                                 })
                                 : $icon.css('cursor', '').tooltip('destroy');
@@ -1093,7 +1093,7 @@ if (typeof jQuery === 'undefined') {
                                     container: 'body',
                                     content: $allErrors.filter('[data-bv-result="' + that.STATUS_INVALID + '"]').eq(0).html(),
                                     html: true,
-                                    placement: 'top',
+                                    placement: 'auto top',
                                     trigger: 'hover click'
                                 })
                                 : $icon.css('cursor', '').popover('destroy');