Forum Discussion
ZVIBOCK
Qrew Cadet
Hi I am facing the same issue I have tabs but need a way modify the code so it returns us to the current tab. I don't see anything in Dan's profile that would allow me to contact him. If Dan or anyone else can help me would appreciate it.
My code is
var markup = ""; markup += "<ul>";
$("#formContents div.sectionDiv").each(function(index){
markup += "<li><a href='#tab_" + (index+1) + "'>" + $("span.sectionTitle",this).text() + "</a></li>";
});
markup += "</ul>";
$("#formContents").prepend(markup);
$("#formContents div.sectionDiv").each(function(index){
$(this).attr("id","tab_" + (index+1));
$("div:lt(2)",this).hide();
});
$("#formContents").tabs();
My code is
var markup = ""; markup += "<ul>";
$("#formContents div.sectionDiv").each(function(index){
markup += "<li><a href='#tab_" + (index+1) + "'>" + $("span.sectionTitle",this).text() + "</a></li>";
});
markup += "</ul>";
$("#formContents").prepend(markup);
$("#formContents div.sectionDiv").each(function(index){
$(this).attr("id","tab_" + (index+1));
$("div:lt(2)",this).hide();
});
$("#formContents").tabs();
_anomDiebolt_
8 years agoQrew Elite
As to your question, you have to place some additional code in the page to store the selected tab settings into local storage on a per user basis. When you visit a page information is saved in various places in your browser including cookies, local storage, session storage, indexdb, memory and disk cache, and most recently servcie workers etc.
These storage locations contain information that is helpful for you next visit to the site by remembering information or speeding up a process. Also since I am obsessing about Service Workers for the next 30 days, I will just mentioned that you can think of a Servcie Workers are just a JavaScript file stored on your computer to help you during subsequent visits to the same site. They are perfectly safe and just represent a natural evolution of web technology.
These storage locations contain information that is helpful for you next visit to the site by remembering information or speeding up a process. Also since I am obsessing about Service Workers for the next 30 days, I will just mentioned that you can think of a Servcie Workers are just a JavaScript file stored on your computer to help you during subsequent visits to the same site. They are perfectly safe and just represent a natural evolution of web technology.