I would like to avoid doing this for each link, and instead have a single function that can be used to open all specified links in a new resized window.
I’m a little stuck on how to accomplish this. All solutions for this seem to have the URL in the function. Any directions or thoughts on how to accomplish this would be greatly appreciated.
$(".popUplink").click(function(){
var hyperLink = $(this).attr('href'); // This will fetch the URL of the link
console.log(hyperLink);
window.open(hyperLink, 'popup', 'width=800,height=400'); return false;
});
I hope you want the same thing which I have mentioned above.