XenForo How do I add a class to .overlay-container with JS?

J

Joe Link

Guest
What I'm trying to do is add a class to the overlay-container when a specific button is clicked, so that I can change the CSS behavior of specific overlays (some normal, some ease-in, etc). I don't know JavaScript, but I know it's possible and I know I'm close. Comments as to why it's not a good idea are also welcome, if that's the case! :)

This works to apply "conversation-overlay" the "p-pageWrapper" class when the button with "js-badge--conversations" is clicked:

JavaScript:

$(function () {...

Read more

Continue reading...