trigger an anchor tag using the .click() event
<p><br>
    For my application I want to trigger an anchor tag using the .click() event, which should redirect to page mention in href.i m using following code to achieve it.but its not working as expected. </p>

<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
    &lt;html&gt;
    &lt;head&gt;
    &lt;title&gt;&lt;/title&gt;
    &lt;script src="http://code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;script&gt;
    $(function() {
        $('#upload').click(function(e) {
            e.preventDefault();
                $("#login_or_register").click();
        });
    });
    &lt;/script&gt;
    &lt;div id ='upload'&gt;upload&lt;/div&gt;
    &lt;a  style ='display:none' href="abc.html" id="login_or_register"&gt;Login or register&lt;/a&gt;
    &lt;/body&gt;
    &lt;/html&gt;
</code></pre>

<p>Help me out!!</p>
