I prefer keeping all the JS in the .js file, adding a callback using jQuery to the input's `click` event. This way it's clear when `toggleLearning()` will be called from reading just the .js file. But this works as well, and if you prefer it this way, that's fine too.