title: how to run jquery code, after data load
body: <p>I try to run js code after data load
  it work's conversely now first it's run code, before load data, and delete class .active, I need delete class after click on another link</p>
  
  <p>here is my code:</p>
  
  <pre><code> $('document').ready(function() {
              $('.links a').click(function(e) {
                  e.preventDefault();
                  $('.links a').not(this).removeClass('active');
                  $(this).addClass('active');
              });
          });
          function Animate2id(id) {
              // your function stuff
          }
  </code></pre>
  
  <p>and my html: </p>
  
  <pre><code>&lt;div class ="links"&gt;
          &lt;a id="section-&lt;?=$arParams['CODE']?&gt;-link" href="#" onclick="ajax_load('#no-scroll-items-&lt;?=$arParams['CODE'];?&gt;', '&lt;?=$arResult['AJAX_CALL_ID']?&gt;', 'do=select_section&amp;id=&lt;?=4610?&gt;'); return false;" class="" title="Мобильные телефоны"&gt;Мобильные телефоны&lt;/a&gt;
          &lt;a id="section-&lt;?=$arParams['CODE']?&gt;-link" href="#" onclick="ajax_load('#no-scroll-items-&lt;?=$arParams['CODE'];?&gt;', '&lt;?=$arResult['AJAX_CALL_ID']?&gt;', 'do=select_section&amp;id=&lt;?=4611?&gt;'); return false;" class="" title="Планшеты"&gt;Планшеты&lt;/a&gt;
          &lt;a id="section-&lt;?=$arParams['CODE']?&gt;-link" href="#" onclick="ajax_load('#no-scroll-items-&lt;?=$arParams['CODE'];?&gt;', '&lt;?=$arResult['AJAX_CALL_ID']?&gt;', 'do=select_section&amp;id=&lt;?=4616?&gt;'); return false;" class="" title="Монопады"&gt;Монопады&lt;/a&gt;
          &lt;a id="section-&lt;?=$arParams['CODE']?&gt;-link" href="#" onclick="ajax_load('#no-scroll-items-&lt;?=$arParams['CODE'];?&gt;', '&lt;?=$arResult['AJAX_CALL_ID']?&gt;', 'do=select_section&amp;id=&lt;?=4630?&gt;'); return false;" class="" title="Наушники"&gt;Наушники&lt;/a&gt;
          &lt;a id="section-&lt;?=$arParams['CODE']?&gt;-link" href="#" onclick="ajax_load('#no-scroll-items-&lt;?=$arParams['CODE'];?&gt;', '&lt;?=$arResult['AJAX_CALL_ID']?&gt;', 'do=select_section&amp;id=&lt;?=4739?&gt;'); return false;" class="" title="Медиаплееры"&gt;Медиаплееры&lt;/a&gt;
          &lt;a id="section-&lt;?=$arParams['CODE']?&gt;-link" href="#" onclick="ajax_load('#no-scroll-items-&lt;?=$arParams['CODE'];?&gt;', '&lt;?=$arResult['AJAX_CALL_ID']?&gt;', 'do=select_section&amp;id=&lt;?=4593?&gt;'); return false;" class="" title="Аксессуары"&gt;Аксессуары&lt;/a&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>what I missing? 
  best regards</p>