<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Drupal behaviors gets called whenever
      something is called on AJAX, so you need to make sure you're doing
      any binding or DOM manipulation only once. Check out something
      like autocomplete.js in Drupal's misc folder. In Drupal 6 it adds
      a selector of :not(.autocomplete-processed), then adds that class
      to the element in the each loop so it doesn't do things that
      should run once on every AHAH/AJAX call. Drupal 7 uses the jQuery
      .once library to make it a little simpler.<br>
      <pre class="moz-signature" cols="72">Jamie Holly
<a class="moz-txt-link-freetext" href="http://hollyit.net">http://hollyit.net</a></pre>
      On 10/23/2013 5:41 PM, Chris Miller wrote:<br>
    </div>
    <blockquote
      cite="mid:705358934.42223.1382564492171.JavaMail.root@tryx.org"
      type="cite">
      <div style="font-family: arial, helvetica, sans-serif; font-size:
        10pt; color: #000000">
        <div>Hi Folks,</div>
        <div><br>
        </div>
        <div>I have a tiny AJAX example and it works -- in fact it works
          too well.&nbsp; On the first click, it does what it is supposed to
          do -- insert a DOM node with text after the &lt;A&gt; node
          with id=ajax-enabled..&nbsp; On the second click is does it TWICE
          and I can see two throbbers run.&nbsp; On the third click, you
          guessed it, FOUR throbbers.&nbsp; Is there some context that I need
          to clear after the AJAX call or some object I need to re-use
          to prevent this?</div>
        <div><br>
        </div>
        <div>Also, as I investigate the DOM with the browser inspector,
          I can't find where all the event handlers are attached.&nbsp; When
          I look in the naive places, I see references to jQuery, but I
          believe that jQuery is dispatching to something somewhere and
          I'd like to know where that somewhere is.&nbsp; I should be able to
          find it.<br>
        </div>
        <div><br>
        </div>
        <div>Thanks for the help,</div>
        <div><br>
        </div>
        <div><span name="x"></span>Chris.<span name="x"></span><br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
  </body>
</html>