From 9632d1cd01148f1ddc157729d3e0ea99fcbd2a8d Mon Sep 17 00:00:00 2001 From: Luka Murn Date: Tue, 2 Oct 2018 13:49:19 +0200 Subject: [PATCH] Set tooltips initialization to comply with turbolinks Also add custom styling options as another data attribute. --- app/assets/javascripts/sitewide/tooltip_helper.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/sitewide/tooltip_helper.js b/app/assets/javascripts/sitewide/tooltip_helper.js index ed9098512..55fa035e2 100644 --- a/app/assets/javascripts/sitewide/tooltip_helper.js +++ b/app/assets/javascripts/sitewide/tooltip_helper.js @@ -15,6 +15,7 @@ $('.help_tooltips').each(function(i, obj) { var link = $(obj).data('tooltiplink'); var textData = $(obj).data('tooltipcontent'); + var customStyle = $(obj).data('tooltipstyle'); $(obj) .popover({ @@ -23,7 +24,9 @@ placement: 'auto right', trigger: 'manual', content: 'popovers will not display if empty', - template: '