Hello,
I am not able to get my JavaScript to work in the app. It works in my standard browser, but, not the app.
Is there something special I need to do to get it to execute JavaScript?
Note, I’m not using JQuery or any third-party plugins. Here is the code I’m attempting to run:
`
document.addEventListener(“DOMContentLoaded”, function() {
var today = new Date().getTime();
var events = document.querySelectorAll(‘.event’);
events.forEach(function(event) {
var expires = new Date(event.getAttribute(‘data-expires’)).getTime();
if (today < expires) {
event.classList.remove(‘hidden’);
}
});
});
`
I’ve attempted both in-lining the JavaScript and referencing it as an external file but, neither works. Is there a way to debug the console errors I may be encountering?