 <p>The simplest and best way to address this problem is using toggle(). </p> <p>//html</p> <pre><code>&lt;button id="reloadButton"&gt; Hover me &lt;/button&gt; &lt;div id="reloadWarningBackground" style="display:none;"&gt; &lt;p&gt; Hello this is me &lt;/p&gt; &lt;/div&gt; </code></pre> <p>//Javascript</p> <pre><code>$('#reloadButton').hover(function() { $('#reloadWarningBackground').toggle(); }); </code></pre> <p><a href="https://jsfiddle.net/k1L5nzz3/" rel="nofollow">fiddle</a></p>