jquery: how to disable a function with `.click(function() {`
<p>How can i disable a jquery function with <code>.click(function() {</code></p>

<p>for example i need to disable the following code, if the user clicked on <code>.click(function() {</code></p>

<pre><code>    function infinity() {
$.ias({container:'#dle-content',item:'.item_p',pagination:'.page_navigation1',next: 'div#page_navigation1 a:last-child',loader:'&lt;p&gt;&lt;center&gt;&lt;img src="{THEME}/images/loa$
}
infinity();
</code></pre>

<p>what i've tried:</p>

<pre><code>$("#pages_navigation").off('infinity');
$("#pages_navigation").unbind('infinity');
</code></pre>
