title: jquery add class on click event not working
body: <p>in my project have menu and i give them ids for sub menu and it's in header.php</p>
  
  <pre><code>&lt;div class="top-menu"&gt;
      &lt;ul&gt;
      &lt;nav class="cl-effect-13"&gt;
      &lt;li&gt;&lt;a href="about.php" id="about"&gt;About&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="product.php" id="product"&gt;Products&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a class="scroll" href="#news" id="news"&gt;News&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="typography.php" id="typo"&gt;Typo&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="contact.php" id="contact"&gt;Contact&lt;/a&gt;&lt;/li&gt;
      &lt;/nav&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>now when i click about it goes to about.php or if i click contact it goes to contact.php. now in about.php i insert jquery like this.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function() {
              /*
              var defaults = {
              containerID: 'toTop', // fading element id
              containerHoverID: 'toTopHover', // fading element hover id
              scrollSpeed: 1200,
              easingType: 'linear' 
              };
              */
      $().UItoTop({ easingType: 'easeOutQuart' });
      $('#about').addClass('active');
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>and for different php file i give diff. id. it's working fine till i insert following code in footer.php</p>
  
  <pre><code>&lt;script src="https://code.jquery.com/jquery-2.1.1.min.js" type="text/javascript"&gt;&lt;/script&gt;
              &lt;script&gt;
              function sendContactus() {
                  var valid;  
                  valid = validateContactto();
                  if(valid) {
                      jQuery.ajax({
                      url: "dropusline.php",
                      data:'fname='+$("#fname").val()+'&amp;lname='+$("#lname").val()+'&amp;email='+$("#email").val()+'&amp;phone='+$("#phone").val()+'&amp;message='+$("#message").val(),
                      type: "POST",
                      success:function(data){
                      $("#mail-statusto").html(data);
                      },
                      error:function (){}
                      });
                  }
              }
  
              function validateContactto() {
                  var valid = true;   
                  $(".text").css('background-color','');
                  $(".error").html('');
  
                  if(!$("#email").val()) {
                      $("#email-info").html("(required)");
                      $("#email").css('background-color','#FFFFDF');
                      valid = false;
                  }
                  if(!$("#message").val()) {
                      $("#message-info").html("(required)");
                      $("#message").css('background-color','#FFFFDF');
                      valid = false;
                  }   
                  return valid;
              }
              &lt;/script&gt;
  </code></pre>
  
  <p>it's ajax code for inquiry in footer part and i include footer.php for all files that mention in header.php. i want javascript code that in footer.php as well as jquery code to perform. now jquery code is not performing.</p>