on site have buttons. when user clicks button, modal opens. when user hovers button, tooltip shown.
is use code:
<button type="button" rel="tooltip" title="tooltip content" class="btn btn-sm btn-default" data-toggle="modal" data-target="#deleteusermodal"> <span class="glyphicon glyphicon-remove"></span> </button> <div>modal</div> <script> $(document).ready(function(){ $('[rel="tooltip"]').tooltip(); }); </script>
this works, problem tooltip stays visible after button clicked, , modal shown. modal closed, tooltip hidden again.
how prevent this? want tooltip shown on hover, , not time when related modal visible.
fixed using.
$(document).ready(function(){ $('[rel=tooltip]').tooltip({ trigger: "hover" }); });
the problem focus stays on button when modal open. changing trigger hover solves problem.
Comments
Post a Comment