Note that there are some explanatory texts on larger screens.

plurals
  1. POJQuery tabs system
    text
    copied!<p>Wrote this script and it all seems ok to me but for some reason jquery doesnt want to work. Been trying to get this to work for ages with no luck. If you wouldnt mind could you skim over it for me. I apologise if i am missing something simple but my eyes are glazed now lol.</p> <p>heres the html &amp; php</p> <pre><code>&lt;ul class="tabs"&gt; &lt;li class=""&gt;&lt;a href="#about"&gt;About&lt;/a&gt;&lt;/li&gt; &lt;li class=""&gt;&lt;a href="#contact"&gt;Contact &lt;?php echo $retailers['Retailer']['company'];?&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;div class="tab_container"&gt; &lt;div id="about" class="tab_content"&gt; &lt;h3&gt;About &lt;?php echo $retailers['Retailer']['company'];?&gt;&lt;/h3&gt; &lt;p&gt;&lt;?php echo $retailers['Retailer']['description'];?&gt;&lt;/p&gt; &lt;/div&gt; &lt;div id="contact" class="tab_content"&gt; &lt;h3&gt;Contact &lt;?php echo $retailers['Retailer']['company'];?&gt;&lt;/h3&gt; &lt;h4&gt;Email &lt;?php echo $retailers['Retailer']['company'];?&gt;&lt;/h4&gt; &lt;p&gt;&lt;?php echo $retailers['Retailer']['email_address'];?&gt;&lt;/p&gt; &lt;h4&gt;Phone &lt;?php echo $retailers['Retailer']['company'];?&gt;&lt;/h4&gt; &lt;p&gt;&lt;?php echo $retailers['Retailer']['phone'];?&gt;&lt;/p&gt; &lt;h4&gt;Fax &lt;?php echo $retailers['Retailer']['company'];?&gt;&lt;/h4&gt; &lt;p&gt;&lt;?php echo $retailers['Retailer']['fax'];?&gt;&lt;/p&gt; &lt;h4&gt;Write to &lt;?php echo $retailers['Retailer']['company'];?&gt;&lt;/h4&gt; &lt;p&gt;&lt;?php echo $retailers['Retailer']['address_line_1'];?&gt;,&lt;br /&gt;&lt;?php echo $retailers['Retailer']['address_line_2'];?&gt;,&lt;br /&gt;&lt;?php echo $retailers['Retailer']['city'];?&gt;,&lt;br /&gt;&lt;?php echo $retailers['Retailer']['county'];?&gt;,&lt;br /&gt;&lt;?php echo $retailers['Retailer']['postcode'];?&gt;&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>Heres the jquery:</p> <pre><code>&lt;script type="text/javascript" language="javascript"&gt; $(document).ready(function() { //Default Action $(".tab_content").hide(); $("ul.tabs li:first").addClass("active").show(); $(".tab_content:first").show(); //On Click Event $("ul.tabs li").click(function() { $("ul.tabs li").removeClass("active"); $(this).addClass("active"); $(".tab_content").hide(); var activeTab = $(this).find("a").attr("href"); $(activeTab).fadeIn(); return false; }); }); &lt;/script&gt; </code></pre> <p>Sorry cant give you all a link but its on local machine.</p> <p>Thanks folks </p> <p>Jamie</p>
 

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