How to output a div inside another div with jQuery
first principal div :
<div id ="username_error"></div>
and this one will be inside it :
<div class="alert alert-primary" role="alert">
This is a primary alert—check it out!
</div>
I tried
$("#username_error").html('<div class="alert alert-primary" role="alert">
This is a primary alert—check it out!
</div>
');
but it doesn't work , is there an alternative method thanks in advance