Dom on mobile phones are slow, and many jQuery functions are even slower. My problem is that when I use a slow jQuery function after a dom function, the dom is loaded after jQuery.
An example:
function() {
element.style.backgroundColor = somethingnew; //this is loaded in the end
alert('YOLO!'); //this is loaded first
}
But the Javascript engine starts width alert() and ends width the dom. That means the engine is loading in the WRONG ORDER! :(
How can I load the alert function or whatever I want AFTER the dom is loaded?
Alex