jquery - How To Append (Or Other Method) a Lot of HTML Code? -


i need append lot of html code. improve readability, don't want write in 1 line, split them regular html. 15 new-lines or something. problem javascript doesn't allow me that.

var target = $('.post .comment_this[rel="' + comment_id + '"]').parent().parent();  target.append('     <div class="replies">         <p>...</p>         <img src="" alt="" />     </div> '); 

basically, need add html in place.

i need add variables too.

    target.append(' <div class="replies">'+             '<p>...</p>'+             '<img src="" alt="" />'+         '</div>'     ); 

or

    target.append(' <div class="replies">\             <p>...</p>\             <img src="" alt="" />\         </div>'     ); 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -