JQUERY UI TABS - PreventDefault jumping

306 views Asked by At

i've read a lot of questions and answers about that behavior but can't find a solution working in my particular case.

I'm using JQUERY UI TABS and i'm sending back the id's of the anchor in the url so the opened tab stay opened on page refresh. I would like to disable anchor jumping when loading a tab so the top of the website is always visible when navigating trought tabs. Here is my code :

jQuery(document).ready(function () {

    $(".tabs").tabs({
        activate: function (event, ui) {
            window.location.hash = ui.newPanel.attr('id');
            return false;
        }
    });
});
0

There are 0 answers