title: stop setinterval in jquery
body: <p>i have this code that make an li change it class every one sec : </p>
  
  <pre><code>function getclient(FromClient) {
      var NewMsgLi = $("#FriendsList").find('li[id$=' + FromClient + ']');
      setInterval(function () {
          NewMsgLi.toggleClass("NewMsgClass");
      }, 1000);
  }
  
  function InitiateChat(ToClient) {
      $("#FriendsList").find('li[id$=' + ToClient + ']').removeClass("class");
  }
  </code></pre>
  
  <p>InitiateChat fires after i click on a button the FromClient and ToClient are basically the same id but the problem  is that the 'li' do not return to normal any idea what i did wrong </p>