Jump to content

How to save this in local storage ?


Stelian

Recommended Posts

Localstorage will do that. First you set a default value if localstorage does not currently store any value related to chosen font size, else load localstorage value and make the chosen font-size active on page load or refresh.

Then set onclick event to make selected fontsize active then at same set localstorage to store currently selected font-size also.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...