Skip to content Skip to sidebar Skip to footer

JQuery UI And Loading Data Into A Tab

I'm using JQuery UI to create a tab, and I want to the contents of my php file to be entered into this tab. I start by creating a tab, and then selecting it. function createTab2()

Solution 1:

In your markup for tab 2 you need add an href to the source html.

<div id="tabs">
 <ul>
     <li><a ><span>Content 1</span></a></li>
     <li><a href="tab2.php"><span id="tabs-2">Content 2</span></a></li>
     <li><a ><span>Content 3</span></a></li>
 </ul>
</div>

or you can try load the tab directly.

$("#tabs-2").load('tab2.php');

source


Post a Comment for "JQuery UI And Loading Data Into A Tab"