In my js file, I am outputting hyperlinks based on some data pulled from an API:
output += '<a class="reg_link" href="'+regObj.href+'?reg='+value+'" title="'+regObj.title+'" target="_blank">';
This works fine. However, later I want to find out what the ?reg=
value is.
$(".reg_link").each(function() {
// How do I get the GET variable from the URL?
});
I'm trying to grab whatever the value of the GET variable is. How do I do that?