What's the best way to add an alert box to a link in D7
no there is no js related function in drupal 7 that provides a functionality like that. just make sure that custom setup you have there is in your template.php