How to organize Javascript and AJAX with PHP?
<p>My javascript is getting out of hand for my PHP application. I have 20  tags that link to various javascript files in a javascript folder.
Each javascript file basically controls one element on the DOM. And, if the javascript file uses AJAX, then it will have a corresponding PHP file that the AJAX will call.</p>

<p>For example, a js file might control a button on the page:</p>

<pre><code>$(document).ready(function () {
  $("#button").live('click', function() {
    $.ajax({
      type: "POST",
      data: ...
      url: "button_click.php",
    });
  });
});
</code></pre>

<p>As you can see, this gets out of hand. What is the best way to organize all of the javascript?</p>
