Commit 657b8d41 authored by Pierre Dittgen's avatar Pierre Dittgen

stickier popovers

parent d9a20943
......@@ -154,13 +154,27 @@
{% block page_scripts %}
<script>
$(function() {
// Errors tooltip activate
$('[data-toggle="popover"]').popover({
html: true,
placement: "auto",
trigger: "hover"
// Popovers that stays while on popover bubble
// https://stackoverflow.com/questions/15989591/how-can-i-keep-bootstrap-popover-alive-while-the-popover-is-being-hovered
$('[data-toggle="popover"]').popover({
trigger: 'manual',
html: true,
animation: false,
placement: 'auto'
})
.on('mouseenter', function () {
var _this = this;
$(this).popover('show');
$('.popover').on('mouseleave', function () {
$(_this).popover('hide');
});
}).on('mouseleave', function () {
var _this = this;
setTimeout(function () {
if (!$('.popover:hover').length) {
$(_this).popover('hide');
}
}, 100);
});
</script>
{% endblock %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment