Jump to:

3445 Posts in 1031 Topics by 872 members

Template Questions

SilverStripe Forums » Template Questions » jQuery Dynamic Tabs

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

Page: 1
Go to End
Author Topic: 956 Views
  • merrick_sd
    Community Member
    95 Posts

    jQuery Dynamic Tabs Link to this post

    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="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>
             <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


Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.