Danny
Danny

Reputation: 2821

How to use jQuery tabs to link to a URL rather than load a tab using Html.ActionLink?

<ul>
    <li><a href="#tabs-1">Tab1</a></li>
    <li>@Html.ActionLink("Test", "Test")</li>   
</ul>

Upvotes: 1

Views: 166

Answers (1)

DanielB
DanielB

Reputation: 20240

From the docs you can learn how to use the select callback for that.

$('#example').tabs({
    select: function(event, ui) {
        var url = $.data(ui.tab, 'load.tabs');
        if( url ) {
            location.href = url;
            return false;
        }
        return true;
    }
});

Upvotes: 1

Related Questions