I've an <iframe> which is changing its content dynamically and I want to access the elements of <iframe>
Somehow I got access to the elements inside <iframe> using $("#myIFrame").contents().find(".iframeElement").on("click", function(){...}
Now issue is I only got access to static elements of <iframe>, and for accessing dynamic elements I used setInterval which recall the above jquery function every second. That gives me multiple duplicate callbacks. So I tried clearInterval that stops it completely.
Then I also tried calling above setInterval and clearInterval (if previous already exists) inside another setInterval which is also giving me multiple duplicate callbacks! Due to orphan setIntervals
So is there a well-structured way to call same setInterval after clearInterval
Hope you're getting my point!