How to trigger "preview" editor rerender in JavaScript? #18532
andreasnrb
announced in
Developers Community
Replies: 1 comment
-
You may need to target a parent element or the window. $(".parent-element-class").on("change", ".selector-element-class", function() {
$(".target-element-to-respond").val(selectedVar);
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I extend elementor.modules.controls.BaseData and make a custom version of select2 that gets all data from AJAX using custom AJAX transport setting. This Select is then used in a dynamic tag.
However when the user selects a value in the dropdown the selected value is not rendered in the "preview" area of the editor. Clicking on another widget triggers a rerendering but I'd like to trick rerender when a value is selected in the select2 dropdown.
I can't figure out how to trigger a rerendering using JavaScript.
Beta Was this translation helpful? Give feedback.
All reactions