title: Function runs twice after click
body: <p>I am currently working on a project that utilizes an input to create a list of items. I have the addition of programs working, however the deletion of an item is where I am having problems.
  The items are added to an array via .push() and the method of deletion is via the .splice() method. The function correctly splices the correct array element but ends up doing a second pass and deleting the elements before it. How do I stop the splice from happening more than once? </p>
  
  <pre><code>$(skill_add_button).click(function(e){ //on add input button click
          var skill_input=document.getElementById("skill_input").value;
          document.getElementById("skill_input").value = "";
          e.preventDefault();
          if(s &lt; 12){ //max input box allowed
              if (skill_input==""){
                  skillset = skill_arr.join('');
                  alert(skillset);
              } else {
                  s++; //text box increment
                  $(skill_wrap).append('&lt;div class="skill_tag" id="skill_tag'+s+'"&gt;'+skill_input+'&lt;/div&gt;'); //add input box
                  skill_arr.push(skill_input+'|s|');
  
                  alert(skill_arr);
                  $('.skill_tag').hover(function(){
                          $(this).css("background-color", "#C14330");
                          $(this).css("cursor", "pointer");
                          }, function(){
                          $(this).css("background-color", "#04CA29");
                      });
                  $('.skill_tag').click(function() {
                      var skill_id = $(this).attr('id');
                      var index = skill_id.split('skill_tag').pop();
                      skill_arr.splice(index,1);
                      $('#'+skill_id).remove();
                      alert(skill_arr);
                      s--;
                  });
              }
          } 
          if(s &gt; 11) {
                  $(skill_add_button).remove();
           }
      });
  </code></pre>
  
  <p>If I try to put my .skill_tag click function outside of my skill_add_function, it does not work at all.</p>