Satch3000
Satch3000

Reputation: 49374

Bare bones code of jquery tabs

Can anyone provide the bare bones code needed to create jquery tabs please?

I am simply looking for just the basic code with 2 tabs.

Upvotes: 0

Views: 167

Answers (2)

ThiefMaster
ThiefMaster

Reputation: 318468

Why not have a look at the most simple example on the jQuery UI tabs page? There's even a "View source" link: http://jqueryui.com/demos/tabs/

<script type="text/javascript">
    $(function() {
        $('#tabs').tabs();
    });
</script>

<div id="tabs">
    <ul>
        <li><a href="#tab-1">Tab 1</a></li>
        <li><a href="#tab-2">Tab 2</a></li>
    </ul>
    <div id="tab-1">
        tab 1 content
    </div>
    <div id="tab-2">
        tab 2 content
    </div>
</div>

Upvotes: 2

Anteru
Anteru

Reputation: 19374

You can find the code in the official documentation: http://jqueryui.com/demos/tabs/ Just use the "View source" button.

Upvotes: 2

Related Questions