Activating J Query tab from Seperate Image Link

Activating J Query tab from Seperate Image Link

Hi, I'm new to Jquery programming and I was hoping somebody could help.

What I'm looking to do is to have a user click on an image towards the top of my website and then have the browser scroll down and activate the tab.

This is my script in the <head> tags of my document:

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





Further down I have a tabs system set up like this:

  1. <a name="description">
  2. <div id="container-1">
  3.                 <ul>
                        <li><a href="##fragment-1"><span>Features</span></a></li>
                        <li><a href="##fragment-2"><span>Pricing</span></a></li>
                    </ul>  


  4.                 <div id="fragment-1">#q_getproduct.description#</div>   
                    <div id="fragment-2">Stuff Here</div>
  5. </div>

Now my image button is fairly simple:

  1. <a href="#description" id="my-text-link"><img src="../../_images/button_pricing.jpg" width="134" height="39" border="0"></a>
I noticed you can do it the following way, however I have no idea how to implement it:

  1. var $tabs = $('#example').tabs(); // first tab selected

    $('#my-text-link').click(function() { // bind click event to link
    $tabs.tabs('select', 2); // switch to third tab



    return false;
    });
If anyone could please help I would greatly appreciate it.