how to prevent $(document).ready(function() {} from calling a function
<p>i have a simple but bit complicated problem.
what i want to do is that in my php page i have added this</p>

<pre><code>$(document).ready(function() {
 $("a[rel^='prettyPhoto']").prettyPhoto({social_tools:false,overlay_gallery:false});
  });
</code></pre>

<p>now this page get call through ajax too.normal call of page does <strong>nothing</strong>.but when i click  i mean <code>a[rel^='prettyPhoto']</code>  so it call this function prettyPhoto() and that is what i want to do.
when this page call through ajax so it directly execute the function although i have not click any thing.</p>

<p>i have tried this</p>

<pre><code>event.preventDefault();
</code></pre>

<p>but nothing working.
also i put this line  of code in a function and call it but nothing happens.also remove <code>$(document).ready(function() {}); but still not working any clue</code></p>
