Triggering a jQuery function when the page loads and when a link is clicked?
<p>I'm using this function:</p>

<pre><code>$(document).ready(function() {

$('.gdthumbtext')
.contents()
.filter( function(){
    return this.nodeType == 3;
}).each(function(){
    this.nodeValue= this.nodeValue.replace(/\+/g,'');
});

});
</code></pre>

<p>To remove plus signs before numbers inside the <code>.gdthumbtext</code> div.
Now the problem is that the number will change with ajax each time you click a link
with the class <code>.gdt-starrating.</code></p>

<p>I guess I have to call (or recall) that function again when the link is clicked.</p>

<p>Maybe I need something like this: call the function when page loads <strong>or</strong> when the link with class <code>.gdt-starrating</code> is clicked.</p>

<p>Any suggestions of how to do that?</p>
