How to initialize new DOM contents using javascript and keep previous DOM somewhere else? -
i have 2 pages:
- page1.html
- page2.html
page1.html :
<html> <head>some css , js goes here</head> <body><a href="page2.html"></a></body> </html>
page2.html :
<html> <head> few more css , js goes here</head> <body><a href="page3.html"></a></body> </html>
my plan is: when user clicks on
<a href="page2.html"></a>
i grab content of page2.html via ajax , store contents of page1.html in javascript variable
now how can insert content of page2.html in dom , initialize $(document).ready events in javascripts of page2.html must triggered.
Comments
Post a Comment