looking for a cross browser solution to highlight tabs
<p>I'm looking for a cross browser compatible solution to highlight tabs. On page load the first tab should highlight and on click of the other tabs, the first tab would unhighlight and the selected tab would highlight. Can't get this functionality working in same fashion in IE and Firefox at the same time. Any inputs on that?</p>

<p>Note: The below code works but when I click on any other link on the page, the focus on the tabs is lost and hence the currently selected tab is not highlighted.</p>

<p>JS</p>

<pre><code>$(document).ready(function () {
    activate('focusmeplease');
    $('#tabs ul li:first').addClass('active');
    $('#tabs ul li a').click(function () {
        $('#tabs ul li').removeClass('active');
        $(this).parent().addClass('active');
    });
});

function activate(link) {
    if (document.getElementById) document.getElementById(link).focus();
    else if (document.all) document.all(link).focus();
}
</code></pre>

<p>HTML</p>

<pre><code>&lt;div id="tabs"&gt;
    &lt;ul&gt;
        &lt;li class="clas" onclick="javascript: addPlayer('tab-1','1649028604001');"&gt;
            &lt;a href="javascript:void(0);" id="focusmeplease"&gt;First tab&lt;/a&gt;
        &lt;/li&gt;
        &lt;li class="clas" onclick="javascript: addPlayer('tab-1','1651558610001');"&gt;
            &lt;a href="javascript:void(0);"&gt;Second tab&lt;/a&gt;
        &lt;/li&gt;
    &lt;/ul&gt;
    &lt;div id="tab-1"&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>
