Snippet not loading
-
Hi there,
I don´t know why, but my snippet is not working. When I insert it directly as HTML in the site, no problem. But through the plugin it won´t work. “Run snippet everywhere” is activated. And it´s also activated. It is shown in my console in <head> in front end. But why does it not trigger/work with plugin but without it when I insert it directly in my head template as HTML in a div / site builder? This is the snippet like it is inserted in the plugin:
<?php add_action( 'wp_head', function () { ?> <script> document.getElementById("menu-item-136").addEventListener("mouseover", mouseOver); document.getElementById("menu-item-136").addEventListener("mouseout", mouseOut); function mouseOver() { document.getElementById("mega-menu").style.display = "block"; } function mouseOut() { document.getElementById("mega-menu").style.display = "none"; } </script> <?php } );Can u help please?
Regards,
Artan
PS: Please inform me if u need login data, as the site is under construction. I could send u the data in private.
The page I need help with: [log in to see the link]
The topic ‘Snippet not loading’ is closed to new replies.