title: load() function won't allow scripts on page to execute
body: <p>I have a php script which has a select box which allows user to filter some data.And I have used change event on select box to trigger jquery's load function to load a div of another page which will show that filtered data.Now the problem is I have a javascript function which is being called from that page upon some check in php , and this is resulting in that javascript function not getting called at all.Is there any work around in this scenario?I tried using $.get() but I'm not sure if it will allow me to load only part of page.</p>
  
  <p>This is the load() function's call</p>
  
  <pre><code>$('document').ready(function() {
      $('#topic-filter-select').on('change' , function(e) {
          $.ajax({
              type: 'GET',
              url: templateUrl+"/ajax/custom_ajax_functions.php",
              data : {
                  functionName : 'load_topic_filter',
                  topic_id : e.target.value
              },
              success: function(result) {
                  for(var i=0;i&lt;result.length;i++)
                      result[i] = parseInt(result[i]);
                  result = JSON.stringify(result);
  
                  $('#activity-container').empty();
                  $('#activity-container').load("/topic-filter-template?result="+result+" #topic-page");
              },
              error: function(error) {
                  $('#post-0').empty();
                  $('#post-0').append("&lt;div id='filtered-activities'&gt;&lt;h4&gt;Something went wrong , please try again.&lt;/h4&gt;&lt;/div&gt;");
              }
          });
       });
   });
  </code></pre>
  
  <p>And the php check which gives call to javascript function is</p>
  
  <pre><code>&lt;?php $result = has_user_voted($poll_id , $current_user_id);?&gt;      
  &lt;?php if($result[0] == true) :?&gt;
    &lt;?php echo '&lt;script type="text/javascript"&gt;animatePollEffect('.json_encode($result).','.$poll-&gt;ID.')&lt;/script&gt;';?&gt;
  &lt;?php endif; ?&gt;
  </code></pre>