Search code examples
javascripthtmljquery-uijqueryjquery-tabs

Can jQuery UI Tabs load new complete HTML pages?


I created an index.html page that have 3 different tabs. With the function tabs() of jQuery UI I want to load an html page with Ajax. Every HTML page use jQuery library, so every page have this code:

<link type="text/css" href="css/redmond/jquery-ui-1.8.5.custom.css" rel="stylesheet" /> <script type="text/javascript" src="js/jquery-1.4.3.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.5.custom.min.js"></script>

If I click on a tab the page is loaded but the JavaScript function of the page doesn't work!

So can I load in a tab a new complete HTML page (HTML+JS)?


Solution

  • Ok, the problem is to understand what the tabs do. With Ajax I can load some content in a tab. If I declare a <div> for a tab, Ajax loads the content in that <div> so I can't load a new complete HTML page becouse the DOM after the load have two open <html><head> ecc.

    So now I understand the function of the Ajax in the tab, and the load of complete HTML page is a big mistake!

    Thanks Tobias.