In the following code
<script>
$(document).ready(function() {
if(load_flag == 0)
{
var html = '';
html += "<div id ='err_msg' style='display:none;'><b>Preview errors</b> <br></div>";
html += "<div id ='cont' style='display:none;'><input type='button' value='Continue' onclick='javascript:save();' /></div>";
//some more processing
if(err_flag != 1)
{
$("#err_msg").css({"display" : "block"});
$("#cont").css({"display" : "block"});
}
$("#tabledata").append(html);
});
</script>
<div id="tabledata"></div>
The err_msg shows up but id=cont style remains style=none what is wrong with the code