title: How to override default text edit function in Jquery x editable?
body: <p>I am using jquery-ui xeditable and before calling edit submit, I have to validate the values by calling other methods. When I try to use <code>addclass</code> and <code>removeclass</code> it's going in to an infinite loop.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>$("*[id^=EqOwner_customerAssetId]").click(function(e) {  
      alert("Inside click..!");
      e.stopPropagation();
      e.preventdefault();
  
      var fldId = "#" + this.id;
      var cusidflag = "#c" + this.id;
      var equipid = "#e" + this.id;
  
      $('.xeditable').editable('disable');
      if (($(cusidflag).val()) == "false" &amp;&amp; $(equipid).val() != "") {
          $("#dialog-equipment-id-edit").dialog({
              resizable: false,
              height:'auto',
              width: '360',
              modal: true,                      
              buttons: [{ 
                  text:  EDTranslations.ok,
                  click: function() {     
                      $(this).dialog('close');                                 
                  }
              }],
              close: function() {
                  $('.xeditable').trigger('click');  
              }                            
          }); 
      }
  
      $(fldId).editable('editable-click');
  });
  });
  </code></pre>