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 /

jQuery Dynamic Tabs


Reply


1010 Views

Avatar
merrick_sd

Community Member, 97 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">
         <ul>
            <!-- these just load in the whole page template --> <li><a href="http://dev.domain.co.uk/buy">First</a></li>
            <li><a href="#tabs-3">Second</a></li>
            <li><a href="#tabs-3">Third</a></li>
         </ul>
         <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.
         
         <ul>
         <li>item1</li>
         <li> item2 </li>
         </ul></div>

         <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>
         
         <ul>
         <li>item1</li>
         <li> item2 </li>
         </ul>
         </div>
      </div>
<!-- end tabs -->

hope this makes sense

http://dev.cardiffrealtors.co.uk