You can modify the url for your link in the click event. You just have to turn your url into something that's easy to parse. Something like the following;
foreach ($exploredArtistBands as $band) { echo '<a href="/notification/invite/{id}/' . $band['band_id'] . '">Join to ' . $band['name'] . '</a><br />'; } So you end up with a link like:
href="/notification/invite/{id}/band_id" Now in your click handler, replace {id} with the id from the button.
$('.invite').click(function(){ var id = $(this).attr('button-id'); var oldUrlurl = $(this).attr("href"); $(this).attr("href", oldUrlurl.replace('{id}', id)); }); The click event will continue to bubble, but with a new url. This will ultimately direct your browser to the right place. This approach smells to me, but it works.