So I’m working on a dashboard (one page) type application, and I have a set of links:
<a href = "#">3s01</a>
<a href = "#">5e02</a>
<a href = "#">2k01</a>
<a href = "#">3a01</a>
<a href = "#">5j01</a>
etc...
The way the text in between the tags is populated is by grabbing the data from an xml file using JQuery. Because the xml file can change, the links aren’t static. My task is to be able to click on a link and figure out what the text between the tags is, so that I can populate a table on the page accordingly. The only problem is I don’t know how to get that data using JQuery/Javascript/html/whatever. Any help would be much appreciated!
But if you
aare dynamically generated that means, generate after DOM ready then you should tryHere instead of
bodyyou can useANY Valid Selectorthat is parent ofatags which belongs to DOM already.Read more about
.on()