Questions tagged [domcontentloaded]

DOM event The DOMContentLoaded event is fired when the document has been completely loaded and parsed, without waiting for stylesheets, images, and subframes to finish loading (the load event can be used to detect a fully-loaded page).

124 questions
0
votes
1 answer

html button click to add value in javascript class

I have a few buttons with different categories. When the user clicks on the button, the correct category should be displayed. In every category, there are a few products, each with their own "add to cart"-button. So, the user clicks "beds" and then…
0
votes
1 answer

mmenu IE11 problems

I'm just using the mmenu script and I got an IE11 a syntax error on this line. "DOMContentLoaded", () => { The whole code looks like here document.addEventListener( "DOMContentLoaded", () => { new Mmenu( "#my-menu" ); } ); Code…
user1551496
  • 169
  • 2
  • 12
0
votes
1 answer

DOMContentLoaded doesn't work if i navigate to the page, only on refresh

So like i mentioned, the code inside DOMContentLoaded only runs when I refresh the page but if I navigate to said page the data in my table is no longer displayed. I have seen a very similar post here (DOMContentLoaded not firing after navigation…
0
votes
1 answer

How to detect each page load?

I'm trying to catch each page load on https://forum.vivaldi.net //==UserScript== //@include https://forum.vivaldi.net/* //==/UserScript== (function () { window.addEventListener('DOMContentLoaded', function () { alert('A new page is…
user13112502
0
votes
1 answer

How to run all elementor builder script after initial page loading?

Elementor page builder script not loading with swup.js (ajax page loading system) document.addEventListener(“DOMContentLoaded”, () => { // I want to load all elementor page builder script here!! }); Reference…
0
votes
1 answer

Does DOMContentLoaded closing tag always have to be at the end of doc?

Is there a way to get JavaScript code to work without having to encompass my code in a closing tag of DOMContentLoaded. The first example below does not work because the closing tag for DOMContentLoaded is before the code. I'm worried I'm going…
carl walters
  • 159
  • 1
  • 3
  • 11
0
votes
1 answer

2nd div expression not evaluating depending on location of