Reversing jQuery code function
<p>I have the following code which when used in a link goes forward to the next link ... so I'm basically using it to do the function of a next button.</p>

<p>What I need to do is to create a reverse version so I can use it as a Back button.</p>

<p>Here is the code:</p>

<pre><code>&lt;script&gt;
    $("a.mytrigger").click(function(e){  
        var index = $(this).attr("href").substr(5);  
        $('#navigation li:nth-child('+parseInt(index)+') a').click();  
        e.preventDefault();  
    });                         
&lt;/script&gt;
</code></pre>

<p>UPDATE:</p>

<p>Please see the link below for further details:</p>

<p><a href="http://stackoverflow.com/questions/8726871/javascript-jquery-script-click-link-by-code-sliding-form-script/8727481#8727481">Javascript JQuery Script click link by code (Sliding Form Script)</a></p>
