given a block of html that is a var, not on the actual document:
var html_cmt = "Check out this awesome link: https://github.com/jquery/jquery-ui Check out this awesome link: https://github.com/jquery/jquery-ui Check out this awesome link: https://github.com/jquery/jquery-ui Check out this awesome link:"
I need to build an array of all links, I have the following but it's only building the first one, not all.
var hrefs = new Array();
hrefs.push( $("<div>").html(html_cmt).find('a').attr('href'));
Suggestions on how I can create an array of all the links, given html content that is not on the document just a JS var? thank you
html_catvariable doesn't contain any HTML tags. Is that correct?