]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Update foundation.tooltip.js to enable to parse a postionClass when creating Tooltips... 8567/head
authorJames Garner <jamesjohngarner@gmail.com>
Mon, 11 Apr 2016 09:17:36 +0000 (10:17 +0100)
committerJames Garner <jamesjohngarner@gmail.com>
Mon, 11 Apr 2016 09:17:36 +0000 (10:17 +0100)
Changed code so the positionClass checks inside this.options rather than just looking at the elements css

js/foundation.tooltip.js

index 827fcd298490d4b3cba946564b9c7aa8951e8878..ff568baf550943ac2cb3160235b40290586f14af 100644 (file)
@@ -35,7 +35,7 @@ class Tooltip {
   _init() {
     var elemId = this.$element.attr('aria-describedby') || Foundation.GetYoDigits(6, 'tooltip');
 
-    this.options.positionClass = this._getPositionClass(this.$element);
+    this.options.positionClass = this.options.positionClass || this._getPositionClass(this.$element);
     this.options.tipText = this.options.tipText || this.$element.attr('title');
     this.template = this.options.template ? $(this.options.template) : this._buildTemplate(elemId);