js

Call a function after an element has been created

Sometimes this is needed for a DOM element created/loaded outside of your own script, either by a different js library or an event outside of your direct control. For such scenarios, I always set an interval which checks periodically whether the target element exists and if this is true, the interval deletes itself and runs …

Call a function after an element has been created Read More »

Scroll to Top