Sunday, April 17, 2011

Tabbed content in a SharePoint page

Hello all,

I’ve got a requirement to create tabs for content displayed on a web page, so that a user doesn’t have to scroll vertically to read all the content.

Is there a way for jQuery to automatically divide page content into chunks and wrap that into tabs? I’m sure I saw something somewhere once…

From stackoverflow
  • jQuery UI tabs plugin is what you need.

    Example:

    <script>
    $(document).ready(function() {
        $('#example').tabs();
    });
    </script>
    
    <div id="example">
         <ul>
             <li><a href="ahah_1.html"><span>Content 1</span></a></li>
             <li><a href="ahah_2.html"><span>Content 2</span></a></li>
             <li><a href="ahah_3.html"><span>Content 3</span></a></li>
         </ul>
    </div>
    
    Rob : The user creating the content would have to be familiar with html for this solution to work?
    karim79 : Really depends on the implementation. I would suggest checking out the examples on the link provided, I could paste them here but there doesn't seem to be much point.
    Rob : cool, thanks. I'll have a look through the examples.

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.