Table of Contents

How to keep the current tab active on page reload in Jquery UI

You can easily active the current tab after reloading or refreshing the page. See below jQuery code example. You need to replace the tab ID (#efsmsi_tab). Use your own ID here

$(function() {

        show: function(event, ui) {}

		active: localStorage.getItem("currentIdx"),
		activate: function(event, ui) {
		localStorage.setItem("currentIdx", $(this).tabs('option', 'active'));
Share on facebook
Share on twitter
Share on linkedin

Leave a Comment

Your email address will not be published.

Related Posts