getting code in new line

Posted by Man Behind on Stack Overflow See other posts from Stack Overflow or by Man Behind
Published on 2012-04-15T11:50:42Z Indexed on 2012/04/15 17:29 UTC
Read the original article Hit count: 194

Filed under:

I have several divs one of which is as below

<div id="drawarea">    
<img class="draggable ui-droppable ui-draggable ui-draggable-dragging" id="image1"     src="user_2/1323384165.jpg" style="height: 40%; width: 50%; position: absolute; left: 0%; top: 0%;">
<label id="first">This is content of the div</label>
<input type="button" value="GO"/>

</div>

I am using jquerys below function to get the html inside the div and put in a text area

 html = $('#drawarea').html();

$('#codearea').text(html);

the problem is that i am getting all the tags in same line i want to get one element code in one then others on other line so thats its easy to read.

© Stack Overflow or respective owner

Related posts about jQuery