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
Post a Comment