how to find links in nested iframes and append an on-click listener
I have a page that can contain any number of iframes, and those iframes can contain their own iframes, etc. (SharePoint 2013 web parts). I don't know the IDs of the iframes ahead of time and can't control that. I also cannot control the class names. The iframes DO all reside in the same domain, so that part won't be a problem.
Is there a way to iterate through all of the iframes in a document, and all the children as described above, such that I can examine the links in each iframe and attach a "click" function to them (I'm trying to add Google Analytics)?
Any help would be appreciated!!!