mateox
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
*tried and *to work
Forum: Plugins
In reply to: [Inline Google Spreadsheet Viewer] CSV file no ColumsAllright thank you! Maybe this will help more Germans as the default sign seams to be “;” here.
Forum: Fixing WordPress
In reply to: Copying working javascript code to wordpressYes it does. The last function “wis” also seems to work. You can test it on http://www.sprts.de
Forum: Fixing WordPress
In reply to: Copying working javascript code to wordpressI used wp_enqueue_script to load it in the header:
The code in my functions.php is
function cool_scripts() { wp_enqueue_script( 'cool-stuff', get_stylesheet_directory_uri() . '/custom_js/scripts.js', array('jquery'), 'false', false); } add_action( 'wp_enqueue_scripts', 'cool_scripts' )My current scropts.js looks 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();I think I have to change the code in order to make it work. Do you have any idea why this doesn’t work?
Best regards
Mathias
Viewing 4 replies - 1 through 4 (of 4 total)