]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Added ability to customize tooltip fadeIn and fadeOut duration 6516/head
authorneeg <ch_ma@gmx.de>
Thu, 30 Apr 2015 13:42:24 +0000 (15:42 +0200)
committerneeg <ch_ma@gmx.de>
Thu, 30 Apr 2015 13:42:24 +0000 (15:42 +0200)
js/foundation/foundation.tooltip.js

index ab07d7e9279907a3b7162fa37dde4d9b8dc59421..59c1d175305457aa7aaae781bbcbf4691ad4e5f9 100644 (file)
@@ -13,6 +13,8 @@
       touch_close_text : 'Tap To Close',
       disable_for_touch : false,
       hover_delay : 200,
+      fade_in_duration : 150,
+      fade_out_duration : 150,
       show_on : 'all',
       tip_template : function (selector, content) {
         return '<span data-selector="' + selector + '" id="' + selector + '" class="'
 
       this.reposition($target, $tip, $target.attr('class'));
       $target.addClass('open');
-      $tip.fadeIn(150);
+      $tip.fadeIn(self.settings.fade_in_duration);
     },
 
     hide : function ($target) {
       var $tip = this.getTip($target);
-      $tip.fadeOut(150, function () {
+      $tip.fadeOut(self.settings.fade_out_duration, function () {
         $tip.find('.tap-to-close').remove();
         $tip.off('click.fndtn.tooltip.tapclose MSPointerDown.fndtn.tapclose');
         $target.removeClass('open');