I have a jquery code that checks for the class .slide on pageload. I have .slide classes inside my templates that it doesn't find and I am trying to figure out a way to make them find it. (probably by making a directive?)
If anyone has any ideas, I'd greatly appreciate it.
The code is as follows:
var items = $('.slide');
var content = $('.content');
function open() {
    $(items).removeClass('close').addClass('open');
}
function close() {
    $(items).removeClass('open').addClass('close');
}
$('#navToggle').on(clickevent, function(event) {
    event.stopPropagation();
    event.preventDefault();
    if (content.hasClass('open')) {
        close();
    } else {
        open();
    }
});
content.click(function() {
    if (content.hasClass('open')) {
        close();
    }
});
 
    