Jump to content

Need some Help with Jquery

Guest

Need to make 'local" settings for a Script, like 

<script>
Settings - {
  1 = setting 1,
  2 = setting 2,
  3 = setting etc
}
</script>
*loads main script*
  <body>
  
  <p id="1">setting 1</p> //etc

Basically need to make a config, and i have no idea how to, everywhere i have looked just doesnt help. The script is loaded Remotely (on a CDN) and each user has to adjust the config to make it their own.

 

or how can i do this with loading a json file? but get it local, but load the main script from another server

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, zhnu said:

Create default settings and save/load it to localStorage.

Always check in the script if they exists in localstorage if so load those else defaults and when user changes values save to localstorage.

How might i go about this?

Link to comment
Share on other sites

Link to post
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

×