How to force style change in jQuery immediately, before showing confirm() dialog?
<p>Here is jsFiddle link: <a href="https://jsfiddle.net/67kaphgu/" rel="nofollow noreferrer">https://jsfiddle.net/67kaphgu/</a></p>

<pre><code>$(document).ready(function(){
    $("DIV").css("background-color","red");
    confirm("Background not yet changed");
});
</code></pre>

<p>In short, I want to highlight some element and ask for confirmation, before proceeding. However that element changes its style <em>after</em> the <code>confirm()</code> call returns.</p>