Browse Source

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

Ludovic Perrine 11 years ago
parent
commit
339771c33c
1 changed files with 2 additions and 2 deletions
  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');