File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
WebApplication2/Customer/Pages Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 600
600
function showSection (id ) {
601
601
document .querySelectorAll (' .content' ).forEach (el => el .style .display = ' none' );
602
602
document .getElementById (id).style .display = ' block' ;
603
+
604
+ // Save the current section to localStorage
605
+ localStorage .setItem (' activeSection' , id);
603
606
}
604
607
605
- // Dark Mode Toggle
608
+
606
609
// Dark Mode Toggle
607
610
function toggleDarkMode () {
608
611
const body = document .body ;
662
665
});
663
666
});
664
667
665
- window .onload = () => showSection (' servicePlans' );
668
+ document .addEventListener (" DOMContentLoaded" , function () {
669
+ const activeSection = localStorage .getItem (' activeSection' ) || ' servicePlans' ;
670
+ showSection (activeSection);
671
+ });
666
672
</script >
667
673
</body >
668
674
</html >
You can’t perform that action at this time.
0 commit comments