From: James Garner Date: Mon, 11 Apr 2016 09:17:36 +0000 (+0100) Subject: Update foundation.tooltip.js to enable to parse a postionClass when creating Tooltips... X-Git-Tag: v6.2.2-rc1~27^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8567%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Update foundation.tooltip.js to enable to parse a postionClass when creating Tooltips using js Changed code so the positionClass checks inside this.options rather than just looking at the elements css --- diff --git a/js/foundation.tooltip.js b/js/foundation.tooltip.js index 827fcd298..ff568baf5 100644 --- a/js/foundation.tooltip.js +++ b/js/foundation.tooltip.js @@ -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);