Note that there are some explanatory texts on larger screens.

plurals
  1. PODisplaying separate PHP documents with AJAX
    primarykey
    data
    text
    <p>The code is not displaying my PHP elements and I would like to know why.</p> <p>Here is the HTML I am using: </p> <pre><code>&lt;div class="tablocation"&gt; &lt;ul class="css-tabs"&gt; &lt;li&gt;&lt;a class="current" href="/wp-content/themes/blue-and-grey/uni-general.php"&gt;General&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/wp-content/themes/blue-and-grey/uni-courses.htm"&gt;Courses&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/wp-content/themes/blue-and-grey/uni-inthearea.htm"&gt;In the area&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/wp-content/themes/blue-and-grey/uni-sportsandfacilities.htm"&gt;Sports &amp; facilities&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;div class="clear"&gt;&lt;/div&gt; &lt;div class="css-panes"&gt; &lt;div style="display:block"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>Take the first instance, for the uni-general.php - that won't load but the other files for the <strong><em>.htm</em></strong> will load. As soon as it is a PHP Document it won't.</p> <p>Also - Below is the script that I am using to load the documents.</p> <pre><code>&lt;script&gt; $(function() { $("ul.css-tabs").tabs("div.css-panes &gt; div", { effect: 'ajax', onBeforeClick: function(event, i) { // get the pane to be opened var pane = this.getPanes().eq(i); // only load once. remove the if ( ... ){ } clause if // you want the page to be loaded every time if (pane.is(":empty")) { // load it with a page specified in the tab's href // attribute pane.load(this.getTabs().eq(i).attr("href")); } } }); }); &lt;/script&gt; </code></pre> <p>I can supply the PHP documents if needed but to be fair I don't think that is where the problem is.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload