Custom Javascript Function
-
Hello i’m using a custom javascript function added via wp_enqueue only on one page (via is_page()) .
With Autoptimize active, only the function is only executed after onclick.
But the part, that calls the function on page load is not working.
[code language="javascript"]
document.addEventListener("DOMContentLoaded", selectVersion(), false);
[code]If i excluce the whole script from AO, everything works like it should.
Do you know why this problem occurs?
Thank you and best regards
Simon
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Custom Javascript Function’ is closed to new replies.