ASP .NET AJAX TabContainer - Underline the text in the selected tab

62 views Asked by At

I'm trying to underline the tab with the asp .net ajax control toolkit tabcontainer that is currently selected and set the aria-selected attribute for section 508. I have tried several different ways to do this. I am using the following code that has been setup to run on each partial postback of an update panel.

function pageLoadHandle(sender, Aargs) {
    var tabHeader = $('.ajax__tab_active');
    var allTabs = $('.ajax__tab_inner');
    for (var i = 0; i <= allTabs.length - 1; i++) {
        var tab = allTabs[i];
        tab.setAttribute("aria-selected", "false");
    }
    var tabAnchor = tabHeader.find("a[class=ajax__tab_tab]");
    //alert(tabAnchor);
    tabAnchor.attr("aria-selected", "true");
    tabAnchor.css("text-decoration", "underline");
}

The problem that I am seeing is that neither the aria-selected attribute is being set to true or the text is being underline. If you have some suggestions on how to get this working correctly, please let me know. I think the problem is that I am using the wrong query in the .find() method, but dang it, I'm confused. TIA

I'm pulling my hair out on this, so expect some stupidity here. :-)

0

There are 0 answers