Run Javascript Function When Object Content Has Been Loaded January 29, 2024 Post a Comment How do I run a Javascript function when the content of an has been loaded? The DOMContentLoaded event fires before that, and things that rely on it like JQuery's $()Solution 1: Does using the onload DomEvent work? <object onload="changeColor()" data="circles.svg"type="image/svg+xml"id="circles"></object> Copysee my it here Solution 2: You should use onload/ready event of jquery - http://api.jquery.com/ready/Baca JugaPreventing ConcatenationGet Vimeo Thumbnail For Video Using JquerySet Filelist Of Fileinput In Firefox$('#circles').ready(function(){ changeColor(); });` Copy Share You may like these postsHow To Append Dynamically Generated Recursive Sections Of Dom Elements To Its Parent Element?Selecting An Option By Its TextSelect Length Vs. Options.lengthHow To Hide Url In The Popup Window Opened Using Window.open Post a Comment for "Run Javascript Function When Object Content Has Been Loaded"