jquery tabs in ajax mode change source -
i trying change source of particular jquery tab (ajax mode) created. have 5 tabs when user clicks on second tab after 50 seconds source url of iframe needs change (only once).
i know need use select code below determine when user clicked on tab not know start. thank help. code appreciated.
select: function(event, ui) <div id="example"> <ul> <li><a href="ahah_1.html"><span>content 1</span></a></li> <li><a href="ahah_2.html"><span>content 2</span></a></li> <li><a href="ahah_3.html"><span>content 3</span></a></li> </ul> </div>
here's how i've done this.
change url using built in function. changing url in "a" tag won't anything, because link changes when bound tab layout.:
$("#tabdiv").tabs("url", tabindex, newlink);
now url updated, content stays same, refresh tab this:
$("#tabdiv").tabs("load", $("#tabdiv").tabs("option","selected"));
or if want switch tab this:
$("#tabdiv").tabs("load", tabindex);
Comments
Post a Comment