开发者

jQuery: prepending after the stuff

开发者 https://www.devze.com 2023-01-16 11:12 出处:网络
if i have <div id=\"wallCommentResponse<?php echo $displayWall[\"id\"]; ?>\"> test </div>

if i have

<div id="wallCommentResponse<?php echo $displayWall["id"]; ?>">
test
</div>

And:

 $('#wallCommentResponse' + wallID).prepend("lorem ipsum lorem ha!");

I want the prepended stuff come after the text inside it already and not before it..

How 开发者_开发技巧can i do this?


Use append() instead.


Do you mean you want to Append?

$("#wallCommentResponse45").append("<b>foo</b>");

If that's not what you were after, perhaps edit your question to include an expected output.

0

精彩评论

暂无评论...
验证码 换一张
取 消