Jquery and ajax

Jquery and ajax

I am wondering on how to implement jquery on an ajax page. I have had the problem on several sites and still don't know the solution.

Here is the scenario
I have page1.php
then I have my js file (note this is some ajax not jquery).
and lastly my request php page.

How do I implement the jquery on the request page? I have tried all kinds a paths on both the php pages but with on luck.

Here is the iquery I am running.
<script type="text/javascript">
      $(function () { // this line makes sure this code runs on page load
   $('#swapState_all').click(function () {
      $(this).parents('fieldset:eq(0)').find(':checkbox').attr('checked', this.checked);
   });
});
</script>