i have some content in the div and i need to append some data at the top of the previous content inside that di开发者_StackOverflow中文版v by moving the remaining content down after a jquery function call.
thanks in advance
$("#mydiv").prepend(Data)
:)
That should do the trick :)
Use the prepend command: http://api.jquery.com/prepend/
$('#yourDivId').prepend(yourContent);
if you are using ajax call and want to set content at the top of div simply use $('#divId').(AjaxContent);
This will work.
精彩评论