On my site I have a number of links to various external booking forms that should open in new windows. Unfortunately I can only change each links class (can't set the Id's).
What I'm trying to do is to come up with a Javascript that has a function for each external site to open in a new window. And some jQuery that executes the proper function for the link clicked with a certain class in it.
This is one of the functions (others have a different name and url):
function booking-site-1(elt) {
window.open("https://bookings.domainname.eu/4043/31", "_blank", "toolbar=no,status=no,scrollbars=yes,resizable=yes,top=500,left=500,width=600,height=745");
}
And this is the jQuery
jQuery(".booking-site-1-class").click(function(){
alert("Finally!")});
Where the jQuery now successfully shows the alert when I click a link I'd like it to execute the function shown above. I such a n00b that I don't know how to do that.
Hope that someone could give me a few pointers here.