Is there any way to know if a button is not clicked a determined time?
<p>Is there any way to know if a button is not clicked a determined time?
I've two increment and decrement buttons (plus and minus )to control the temperature with Ajax request. The value is incremented one to one with the next function:</p>

<pre><code>Plugin_increment.prototype.startPluginTempe = function (selector, dataAux, dataAux2, varAux, varAux2) {
    var valueElement = $(selector);
    function incrementValue(e){
        if((valueElement.text() &lt; 40) &amp;&amp; (valueElement.text() &gt; 10)){ //max and min
            valueElement.text(Math.max(parseInt(valueElement.text()) + e.data.increment)); 
        }

        if(valueElement.text() == 40){//max
            if(e.data.increment == -1){
                valueElement.text(Math.max(parseInt(valueElement.text()) + e.data.increment));
            }
        }
        if(valueElement.text() == 10){//min
            if(e.data.increment == 1){
                    valueElement.text(Math.max(parseInt(valueElement.text()) + e.data.increment));                  
                }   
        }
        //Ajax request??????
        return false;
    }
    $(varAux).button({
              icons: {
                 primary: "ui-icon-plusthick"
              },
              text: false
        }).bind('click', {increment: 1}, incrementValue);       
    $(varAux2).button({
              icons: {
                 primary: "ui-icon-minusthick"
              },
              text: false
        }).bind('click', {increment: -1}, incrementValue);

};
</code></pre>

<p>"selector" is the selector of a span to show the value. "varAux" and "varAux2" are the selectors to plus and minus buttons.</p>

<p>If I send an Ajax request for each increment, the client is overloaded. I think that an option could be to know if a button is not clicked a determinated time. Another way?</p>

<p>I use jquery-ui to plus and minus buttons.</p>
