Jquery Find which button is clicked then run a specific If else statement? (Newbie)
===

I'm really new to Jquery and am trying to figure out how to determine which link was clicked and then run a if else statement. This is for a video game fansite. 

I have a table set up for unit stats and bunch of Divs set up as buttons (link with display set to block), when a button is clicked it populates the table with that units data and images. I have that working properly. Now in some cases a unit has an alternate weapon with different stats. I have a blank tr tag with a Link inside that only gets text in the td tag when the unit has an alternate weapon. 

What I'm looking to do is have that link alternate (toggle) weapon stats without leaving or refreshing the page. I got it working with one unit but it's alternating the table data (html) the same way for every unit that has that specific link appear. I need it to know which button was clicked and then when the alt link appears, it toggles the proper weapon data for that unit.

I really hope this makes sense because this is only my second day working with jquery. please be as specific as you can with help since I'm a newbie. Thanks so much

My html set up is.

    <div id="unit1"><a href="#">Unit 1</a></div>
                
    <div id="Unit2"><a href="#">Unit 2</a></div>
                
    <div id="Unit3"><a href="#">Unit 3</a></div>

    <table>

    <tr>
    <td><a id="altweapon" href="#"></a></td>
    <td><span id="weapName"></span></td>
    <td><span id="attack"></span></td>
    <td><span id="range"></span></td>
    </tr>

    </table>


My jquery set up.

    $("#Unit1").click(function(){
       $("#altweapon").html("");
       $("#weapName").html("weapon 1");
       $("#attack").html("10");            

     });
    $("#Unit2").click(function(){
       $("#altweapon").html("Alternate");
       $("#weapName").html("weapon 1");
       $("#attack").html("5");            

     });
    $("#Unit3").click(function(){
       $("#altweapon").html("Alternate");
       $("#weapName").html("weapon 1");
       $("#attack").html("15");            

     });

    $("#altweapon").click(function() {
  		$("#altweapon").toggleClass("Wp1").toggleClass("Wp2");
		
		if ($("#altweapon").hasClass("Wp1"))
      {
		  	$("#weapon").html("Weapon 1");
			
      } else
      {
			$("#weapon").html("Weapon2");
      }
     });
 