title: Unbind mouseout event in jquery?
body: <p><strong>Hi!</strong></p>
  
  <p>I got the following code : </p>
  
  <pre><code>function UpdatePriceSubscribeButton() {
  
      if (_userPriceSubscribe &gt; 0) {
          $("#btUpdatePriceSubscribing").removeClass("con");
          $("#btUpdatePriceSubscribing").addClass("conActive");
          $("#btUpdatePriceSubscribing").unbind('onmouseover').unbind('onmouseout');
      }
      else {
          $("#btUpdatePriceSubscribing").removeClass("conActive");
          $("#btUpdatePriceSubscribing").addClass("con");
          $("#btUpdatePriceSubscribing").mouseover(function() { this.className = 'conActive'});
          $("#btUpdatePriceSubscribing").mouseout(function() {this.className = 'con'});
      }
  };
  </code></pre>
  
  <p>The problem with this is that when onmouseout the class will be changed even if the _userPriceSubscribe was set to 1?</p>
  
  <p>What Im trying to do here is to change the current class and the hover class on client side with jquery.</p>
  
  <p><strong>Edit1:</strong> I have also troed $("#btUpdatePriceSubscribing").unbind('omouseenter mouseleave'); that is sugested here : <a href="http://api.jquery.com/hover/" rel="nofollow">http://api.jquery.com/hover/</a></p>
  
  <p><strong>Edit2:</strong> This works :</p>
  
  <pre><code>function UpdatePriceSubscribeButton() {
  
      if (_userPriceSubscribe &gt; 0) {
          $("#btUpdatePriceSubscribing").removeClass("con");
          $("#btUpdatePriceSubscribing").addClass("conActive");
          $("#btUpdatePriceSubscribing").unbind('omouseenter mouseleave');
      }
      else {
          $("#btUpdatePriceSubscribing").removeClass("conActive");
          $("#btUpdatePriceSubscribing").addClass("con");
  
          $("#btUpdatePriceSubscribing").hover(function () { this.className = 'conActive' }, function () { this.className = 'con' });
      }
  };
  </code></pre>
  
  <p>But is this a good way of doing it?</p>
  
  <p><strong>BestRegards</strong></p>