I have a tooltip but it fails to hide on button click.
This is my button :
<button class="btn btn-outline-inverse ajax_addtocart additems
data-toggle="tooltip" title="Add to cart"
id="<?php echo $item->id ?>">
<i class="fa fa-shopping-cart"></i>
<span class="select_options">Add to cart</span>
</button>
This is the button click :
$("button.additems").click(function(e){ //user clicks form submit button
e.preventDefault();
var button = $(this);
var form_data = $(this).attr("id"); //prepare form data for Ajax post
button.prop('disabled', true); //Loading button text //change button text
.............. Continues to do ajax after ajax request
button.prop('disabled', false)
The tootltip stays displayed.
I have tried adding
button.tooltip('hide') //this also fails
I have also tried this and