I’m using this code to do some things when the page include is loaded:
(function(skuid){ var $ = skuid.$;<br> console.log("before the one");<br> $(document.body).one('pageload',function(){ <br> console.log("loaded!");<br> $(".bluebg").css("background-color","blue"); //<-- silly example console.log("loaded!"); $(".redbg").css("background-color","red"); //<-- silly example });<br>})(skuid);<br>console.log("loaded! the end");
This has been working before 9.x (I went directly to 9.3)
With 9.3 $(document.body).one(‘pageload’,function(){ does not work anymore.
I can change it to $(function(){ and it works if the page is not in a page include, but with the page include it does not work.
The weirdest thing is:
If you go to the page directly in the console you see the both loaded, and the blue and red background applied.
If you load the page via page include, you see the 2 loaded in the console, but not the blue and red backgdround