You can likely change that by removing the slash from the end of the permalink structure on wp-admin/options-permalink.php
& you should be good to go.
But as Krzysiek Dróżdż has said: It shouldn’t make a difference in the execution of javaScript & trailing slashes are a best-practaice.