In the Twitter Bootstrap framework, both the Twipsy and Popover plugins list 'manual' as an option for triggering the tooltip. How would one use the manual option (i.e. what's the practical effect of that - how does the tooltip get activated)?
Answer
This is what I ended up using (making use of 'toggle'):
jQuery(document).ready(function($) {
$('.popup-marker').popover({
html: true,
trigger: 'manual',
}).click(function() {
$(this).popover('toggle');
});
});
Popovers can be triggered via JavaScript — just call the popover() Bootstrap method with the id , class or any CSS selector of the required element in your JavaScript code. You can either initialize popovers individually or all in one go.
To create a popover, add the data-bs-toggle="popover" attribute to an element. Note: Popovers must be initialized with JavaScript to work.
You could activate it with:
$('#element').twipsy('show')
And then hide with:
$('#element').twipsy('hide')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With