How to load one div into another.
Posted
by Vinodtiru
on Stack Overflow
See other posts from Stack Overflow
or by Vinodtiru
Published on 2010-04-04T03:39:34Z
Indexed on
2010/04/04
3:43 UTC
Read the original article
Hit count: 357
Hi,
I have a page with 10 different div contents in it. Based on my button click i want the 11th div to load content or just take a copy of div 1 to 10. I mean like on button1 it should load div 1 and on button 2 i will load div 2 etc. All my div 1 to 10 will be hidden and the 11th div alone will be visible.
I need this because of my below hierarchy.
-> Main Page (having the 10 div)
->inner div which is loaded by a ajax request.(this has 11th div and buttons)
Now on click of any button like 1 to 10 its respective divs is supposed to be loaded from the div in the main page. I would like to do this by java script or jquery. Please let me know any possibilities. Any kind of suggestions or solutions is appreciated.
© Stack Overflow or respective owner