Replace div with same div onclick with jQuery -


i want replace div container jquery onclick on button, don't know how this. tried this:

jquery(document).click(function() { ("#dynamic").load("single.php #partial_index"); }); 

but how replace it? won't show if click on (it nothing), that's normal guess because don't state replacing div. there change can work?

i want replace div id called test if click on button dynamic. want replaced single.php #partial_index. button nothing now.

$("#dynamic").click(function() {    $('#test').replacewith($('#partial_index')); }); 

Comments