venkatachalam
venkatachalam

Reputation: 102439

Tab selection in jQuery

I have the need of a click tab event. I am using the following code.

<script type="text/javascript">
    $(function() {
        $('#container-1').tabs();
        $('#start').bind('tabsselect', function(event, ui) {
            alert('tab label ' + ui.tab.text());
        });
     });
 </script>

    .....


 <div id="container-1">
     <ul>
         <li><a href="#fragment-1"><span id="start">Start</span></a></li>
         <li><a href="#fragment-2"><span id="mid">Mid </span></a></li>
           ....
         List of tabs
    </ul>
 </div>

Here, I need the clicked tab name, as an alert. But I am unable to execute it. I tried with jQuery 1.2.6. Should I do any other inclusion in this code?

Upvotes: 0

Views: 144

Answers (1)

Jennifer
Jennifer

Reputation: 5218

Have you got the full list of requirements needed for the jQuery UI tabs method?

The download helper thing on the jQuery site is pretty helpful.

Upvotes: 1

Related Questions