You might want to replace the href='#'
attribute with url.
Replace the line before the comment with this line
$("#news").append("<a href='" + url +"' id = 'url'>" + url + "</a>");
Hope this works!
You might want to replace the href='#'
attribute with url.
Replace the line before the comment with this line
$("#news").append("<a href='" + url +"' id = 'url'>" + url + "</a>");
Hope this works!
Please put the URL in your a tag when you append it in I’d news. Seems that you put a # only instead of a exact url. That’s why it keeps refreshing the page every time you clicked it. See code below
$("#news").append("<a href='" + url +"' id = 'url'>" + url +</a>");
I am using get method to fetch the data from third-party API and I am appending to list its working well but when I click the link it’s reloading and it’s not redirecting the URL link
Is it appending data properly?