Hi! I got this problem with a wordpress plugin I’m working on. I tried using this on a local html page, and it works properly. Now, when I tried on a server with wordpress, I can see that it initializes, but after some miliseconds it gets replaced by the vanilla select menu. I don’t know what could be causing this. What do you fellas think?
edit: I am thinking the cause might have to do with something inside the wordpress theme, or just how I’m using it. Maybe it’s the fact that I’m targetting a ‘menu’ element is what’s causing the issue.
The first menu is how it’s looking with select2. That’s fine. The second menu on the picture is how it ends up looking - a normal select element.
[https://i.imgur.com/W2ALH8T.png] And this is how the script looks like. Nothing complicated, just need to see it run properly first.
Any help on this issue would be greatly appreciated. Thanks, y’all!