show/hide div using jquery and c#
<p>I am trying to show/hide three divs based on jquery using <code>&lt;a href="#id"&gt;</code>. But the code is not working. The code works fine when I map using <code>&lt;a&gt;</code> link using rel attribute.</p>

<p>For example: <code>&lt;a rel="cat1" class="selected"&gt;</code></p>

<h1>Default.aspx</h1>

<pre><code>&lt;div id="featuredleftdiv"&gt;
    &lt;script type="text/javascript"&gt;
        var featuredposts = new ddtabcontent("featuredposts")
        featuredposts.setpersist(true)
        featuredposts.setselectedClassTarget("link")
        featuredposts.init(10000)
    &lt;/script&gt;

    &lt;ul id="featuredposts" class="featuredposts"&gt;
        &lt;li&gt;&lt;a href="#cat1" class="menu"&gt;a&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#cat2" class="menu"&gt;b&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;

    &lt;div class="clear"&gt;&lt;/div&gt;

    &lt;div id="cat1" class="featuredposts_content"&gt;
        &lt;asp:UpdatePanel ID="UpdatePanel4" runat="server"&gt; 
            &lt;ContentTemplate&gt;
                &lt;asp:ListView ID="ListView4" runat="server" GroupItemCount="1" OnPagePropertiesChanging="ListView4_PagePropertiesChanging"&gt;&lt;/asp:ListView&gt;
            &lt;/ContentTemplate&gt;
        &lt;/asp:UpdatePanel&gt;
    &lt;/div&gt;  

    &lt;div id="cat2" class="featuredposts_content"&gt;
        &lt;asp:UpdatePanel ID="UpdatePanel5" runat="server"&gt; 
            &lt;ContentTemplate&gt;
                &lt;asp:ListView ID="ListView5" runat="server" GroupItemCount="1"  OnPagePropertiesChanging="ListView4_PagePropertiesChanging"&gt;&lt;/asp:ListView&gt;
            &lt;/ContentTemplate&gt;
        &lt;/asp:UpdatePanel&gt;
    &lt;/div&gt;  
</code></pre>

<h1>JQuery</h1>

<p>In Head section of html</p>

<pre><code>&lt;script type="text/javascript" src="Scripts/jquery-1.8.3.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
    $("a.menu").click(function () {
        $("div.featuredposts_content").hide();
        $($(this).attr('href')).show();
        return false;
    });
&lt;/script&gt;
</code></pre>
