Tabs: Only onClick Handler

Tabs: Only onClick Handler

 Hi,

I'm new to jQuery and I have a problem with the tab bar.

I built a tab bar:


  1.     <div id="tabs" style="width: 200px; height: 60px;">
            <ul>
                <li><a href="#tab1">Tab 1</a></li>
                <li><a href="#tab2">Tab 2</a></li>
            </ul>
            <div id="tab1">Content 1</div>
            <div id="tab2"></div>
        </div>







My JavaScript / jQuery looks like:


  1. $(function()
      {
            $("#tabs").tabs();
      });




I don't want to change the div content by a tab click. I only want to execute a Javascript which writes the tabindex into a hidden input field, so the content of tab1 should not switched to tab2 by clicking on tab2. I always want to show the content of tab1 and only execute the hidden input field change on clicking tab2.

How can I implement this function?