jquery - Displaying separate PHP documents with AJAX -
the code not displaying php elements , know why.
here html using:
<div class="tablocation"> <ul class="css-tabs"> <li><a class="current" href="/wp-content/themes/blue-and-grey/uni-general.php">general</a></li> <li><a href="/wp-content/themes/blue-and-grey/uni-courses.htm">courses</a></li> <li><a href="/wp-content/themes/blue-and-grey/uni-inthearea.htm">in area</a></li> <li><a href="/wp-content/themes/blue-and-grey/uni-sportsandfacilities.htm">sports & facilities</a></li> </ul> <div class="clear"></div> <div class="css-panes"> <div style="display:block"></div> </div>
take first instance, uni-general.php - won't load other files .htm load. php document won't.
also - below script using load documents.
<script> $(function() { $("ul.css-tabs").tabs("div.css-panes > div", { effect: 'ajax', onbeforeclick: function(event, i) { // pane opened var pane = this.getpanes().eq(i); // load once. remove if ( ... ){ } clause if // want page loaded every time if (pane.is(":empty")) { // load page specified in tab's href // attribute pane.load(this.gettabs().eq(i).attr("href")); } } }); }); </script>
i can supply php documents if needed fair don't think problem is.
doesn't custom standard plugin functionality.
just load tabs $("ul.css-tabs").tabs();
using jquery ui, , whatever have href
load via ajax in tab.
*fetch external content via ajax tabs setting href value in tab links.*
Comments
Post a Comment