开发者

how to load a div content in another div using jquery?

I have one web content form referenced by master page. i need to load the content of div into another div. I am unable to call the content as jquery throws error. Any help will be truely appreciated.

Thanks in ad开发者_StackOverflow中文版vance S S HUSSAIN


Try one of these

//Copies the inner HTML of source
$("#id_of_target_div").html($("#id_of_source_div").html());

//moves the source div into target
$("#id_of_target_div").append($("#id_of_source_div"));

//Moves children of source into target
$("#id_of_target_div").append($("#id_of_source_div").children());


Try using the following.

// you can copy the html and put it in the target div.
$('#target_div').html($('#source_div').html());

// You can clone the div and put it in target.
$('#source_div').clone().appendTo($('#target_div'));
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜