Show and hide bootstrap tooltip using javascript
<p>I need to show bootstrap tooltip when user click on element and condition is false. I've written code for this: <br></p>

<pre><code>&lt;div data-toggle="tooltip" title="You must to log in!" class="stars"&gt;425&lt;/div&gt;
</code></pre>

<p>and Javascript:     </p>

<pre><code>$(".statistics .stars").click( function(){
    if (! user.isLogin){
        $(this).tooltip("show");

        setTimeout(function(){
          $(this).tooltip( 'hide' );
        }, 2000);   
    }
});
</code></pre>

<p>When I don't click I can see default tooltip on hover (I don't need it) and when I click, tooltip don't hide after 2 seconds. How to solve this problems?</p>