Jump to:

3435 Posts in 1026 Topics by 866 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: 944 Views
  • merrick_sd
    Avatar
    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">
             <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

    944 Views
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.