As for .text, when you apply an ID to an Elementor widget, it is often applied a level up from the actual displayed image If you use this on the ID: You won’t update it. Instead use querySelector to target the img directly:
Category: Javascript
Alter .textContent
When you apply an ID to an Elementor widget, it is often applied a level up from the actual displayed text, e.g. for ID=”MyCssId” applied to a Text Editor widget: If you use this on the ID: You will remove the <div> and <p> surrounding the target text, resulting in styling being lost. Instead use […]
Alter styling from JavaScript
Elementor Button Widget
Hide objects and sections on page load
Show / hide section by ID
You can use .style.display as normal, just make sure when you show it you are using ‘flex’ and not ‘inline’ if the element is a flex! Hide it: Show it