Can I use the .click() method to display information from an .ajax call?
I have two ajax calls which display a first set of links and then a second set of links under it onto a webpage. The second set of links are citations and they correspond to one of the links in the first set. When I click on the link in the first set I go to an outside webpage,
here's the code,
var linkBase = "http://www.sciencebase.gov/catalog/item/";
var link = "";
$.each(json.items, function(i,item){
link = linkBase + this.id
$('#sbItems').append('<li><b><a href="' + link + '">' + this.title + '</a> - </b>' + this.summary + '</li>');
});
However I would like to display the second set of links on the webpage instead of going to an outside link.
I set up a jfiddle as to how it looks now. http://jsfiddle.net/XzRFu/
Can I use the .click() method to display the second set of links from my .ajax call ONLY if the link from the first set is clicked??
Thanks for the help