I show a popover when I click on the anchor. But popover does not start on the first click, no matter how it works on the second click.
HTML:
<div class="popover-markup">
<input class="checkbox-inline" type="checkbox" value="Option1">
<a href="javascript:void(0)" class="trigger" data-placement="bottom" tooltip="Manage Users">Option1</a>
<div class="content hide">
<div class="head hide">Select Users For Option1<span class="close_popover"><i class="fa fa-times"></i></span></div>
<div>
<label class="checkbox-inline">
<input type="checkbox" id="" class="si_DSCM" value="user6"> User 6
</label>
</div>
</div>
</div>
JS:
$(document).on('click', ".popover-markup>.trigger", function () {
$(this).popover({
html: true,
title: function () {
return $(this).parent().find('.head').html();
},
content: function () {
return $(this).parent().find('.content').html();
}
});
});
This is my fiddle: https://jsfiddle.net/47pef6g8/
I found similar questions, but that did not help me in my case.
Please, help. Thanks in advance.
source
share