Copying working javascript code to wordpress
-
Hey guys! This is my first post so don’t be angry about any mistakes i make ??
I found some working javascript code at this page Linkhttps://jsfiddle.net/Lwxoeyyp/1/ and I want to copy it to my wordpress site so it will work.
I already created a custom javascript file, uploaded it to my webspace and checked if it is working (it is). Now the question is, what do I have to change to make it work? At the moment, the my custom “jscript.js” file is looking like this:
function save(){ var checkbox = document.getElementById('checkbox1zaal1'); localStorage.setItem('checkbox1zaal1', checkbox.checked); } function load(){ var checked = JSON.parse(localStorage.getItem('checkbox1zaal1')); document.getElementById("checkbox1zaal1").checked = checked; } function wis(){ location.reload(); localStorage.clear() } load();
Any tips? Thank you very much!
The page I need help with: [log in to see the link]
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Copying working javascript code to wordpress’ is closed to new replies.