Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

jQuery Dynamic Tabs

Go to End



Community Member, 99 Posts

16 April 2010 at 3:04am

Does anyone know of any tutorials on how to implement jquery Tabs using Ajax to load dynamically.

I have it working without Ajax

ie <li><a href="#tabs-3">Third</a></li>

but if i change it to a url of a page i get the whole page!!

I need to somehow mage a .ss page or do some php so only the $content of that page gets loaded

<li><a href="{$BaseHref}aboutus">Third</a></li>

<!-- Tabs -->

<div id="tabs">
<!-- these just load in the whole page template --> <li><a href="">First</a></li>
<li><a href="#tabs-3">Second</a></li>
<li><a href="#tabs-3">Third</a></li>
<div id="tabs-1" class="typography" >Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

<li> item2 </li>

<div id="tabs-2" class="typography" >Phasellus mattis tincidunt nibh. Cras orci urna, blandit id, pretium vel, aliquet ornare, felis. Maecenas scelerisque sem non nisl. Fusce sed lorem in enim dictum bibendum.</div>
<div id="tabs-3" ><p>Nam dui erat, auctor a, dignissim quis, sollicitudin eu, felis. Pellentesque nisi urna, interdum eget, sagittis et, consequat vestibulum, lacus. Mauris porttitor ullamcorper augue.</p>

<li> item2 </li>
<!-- end tabs -->

hope this makes sense