Hi team,
I’m facing a challenge with dynamically updating a JavaScript file when new items are added to a repeater. Each item has a title and a description, and I need to ensure that this data is available to my JavaScript as soon as new items are added.
Currently, I’m using wp_localize_scripts
to pass data to the JavaScript, but it doesn’t seem to update with the new content dynamically.
Could anyone provide suggestions on how to effectively pass and update data in JavaScript when items are added dynamically?
Your input on these questions would be really valuable. Thanks in advance for your help!
Regards
Darshan Hiranandani