jquery - UI Tabs, ajax/JSON Request, data not showing in tab -
i'm using jquery-1.9/ui-1.9 jquery-ui tabs. info isn't displayed in tabs-1.
what i'm doing wrong? setting ui.ajaxsettings.datatype = "json" or "html" didn't help either. rest-requested info json , should transformed html afterwards.
my code this:
$(function() { $( "#tabs" ).tabs({ beforeload: function( event, ui ) { ui.jqxhr.fail(function( jqxhr, textstatus, errorthrown ) { ui.panel.html( "daten konnten nicht geladen werden. " + "http status: " + jqxhr.status + " " + errorthrown ); }); }
....
<div id="tabs"> <ul> <li><a href="rest/cfehler/9410273345537">cfehler</a></li> <li><a href="ajax/content3-slow.php">historie</a></li> <li><a href="ajax/content4-broken.php">einzelfälle</a></li> </ul> <div id="tabs-1"> </div> </div> }); });
are saying you're trying show in div "tabs-1"? because if case, there easy solution. add
<li><a href="#tabs-1">tab 1</a></li>
right after . display content in tabs-1 before of ajax loaded. have add together content tabs-1, , display whatever want to.
jquery user-interface jquery-ui-tabs
No comments:
Post a Comment