This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: JS/DOM issue after results are filtered in Elementor posts element.

Home Forums Product Support Forums Ajax Search Pro for WordPress Support JS/DOM issue after results are filtered in Elementor posts element. Reply To: JS/DOM issue after results are filtered in Elementor posts element.

#30870
Ernest MarcinkoErnest Marcinko
Keymaster

Hi,

When a DOM node changes, event handlers are usually not re-attached to the new set of items in the parent node. It is not the issue of either of the plugins. These codes will not work on any dynamically generated contents. It is possible to rewrite them in a different way, please check the Event binding on dynamically generated elements

In you case something like this may work:

jQuery('.elementor-element-42c810b').on('click', '.fly-pattern-btn', event => {
	jQuery(event.currentTarget).next().toggle();
	console.log('material stuff');
});