Consider the following code:
<div id="thediv" >hola</div>
<button id="resharper">button</button>
with javascript / jQuery:
$("button").on( 'click', function() {
$("#thediv").show();
alert('click');
});
$(document).ready(function(){
$("#thediv").hide();
})
I want the behavior to show the div tag first and then display the "Click" warning. Instead, the behavior is reversed. The warning text is displayed first, and then the button is displayed. Did I miss something?
Can I somehow change the code to get the desired behavior when the div is first displayed and then warning text appears.
Harry source
share