Setting tooltips on widgets
-
HI, i´m trying to set some tooltips on my home on a widget item.
On categories i can set it up easy setting something like these on client.js or vanilla.js on $('document').ready function$('.category-icon a').tooltip({ placement: 'left' });
But on widgets refuse to work
tried also these actions but no look$(window).on('action:ajaxify.contentLoaded', tooltipOnWidget); $(window).on('action:categories.loaded', tooltipOnWidget);
any help?
-
Try adding a class to the tooltips like
class="has-tooltip"
and$(document).ready(function() { $('body').tooltip({ selector: '.has-tooltip' }); });
-
That's strange... that's how I do it on my widgets. What does your actual tag look like that's throwing the widget?
-
@yariplus said:
That's strange... that's how I do it on my widgets. What does your actual tag look like that's throwing the widget?
something like these
<a href="<!-- IF topics.user.userslug -->{relative_path}/user/{topics.user.userslug}<!-- ELSE -->#<!-- ENDIF topics.user.userslug -->" class="tooltipwidget" title="test">{topics.user.username}</a>
then on the client.js of theme lib
$(document).ready(function() { $('body').tooltip({ selector: '.tooltipwidget' }); });
or
$('.tooltipwidget').tooltip({ placement: 'left' });
-
Hmm, maybe try resetting your browser cache. Browser might be caching that widget's .tpl file and won't see the updated class.