Preserve Active Tab after PostBack when using Simple Tab in Asp.Net
<p>I am using <a href="http://www.htmldrive.net/items/show/542/Simple-Tabs-w-CSS-jQuery.html" rel="nofollow">Simple Tab</a> for ASP.NET web application. You can see the  <a href="http://www.htmldrive.net/items/demo/542/Simple-Tabs-w-CSS-jQuery" rel="nofollow">Demo</a> of simple tab here.</p>

<p>I want to preserve the Active tab even after postback.</p>

<p>I tried writing the following code but couldnot make the progress.</p>

<pre><code>       $(document).ready(function () {
            debugger;
            //Default Action
            var activeTab;
            if (activeTab == undefined) { &lt;-- Added by me but the variable activeTab is refreshing every time and is undefined for every post back.
                $(".tab_content").hide(); //Hide all content
                $("ul.tabs li:first").addClass("active").show(); //Activate first tab
                $(".tab_content:first").show(); //Show first tab content
            }
            //On Click Event
            $("ul.tabs li").click(function () {
                debugger;
                $("ul.tabs li").removeClass("active"); //Remove any "active" class
                $(this).addClass("active"); //Add "active" class to selected tab
                $(".tab_content").hide(); //Hide all tab content
                activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
                $(activeTab).fadeIn(); //Fade in the active content
                return false;
            });

        });
</code></pre>
