title: Ajax and JQuery not working when submitting links
body: <p>I'm working with some JQuery and Ajax in order to submit a few links, and one of them is working, but not the other two.. Could someone help me out?..</p>
  
  <p>Ajax / Jquery:</p>
  
  <pre><code>//Logout button
  $('#logout').click(function(e){
      console.log('logout');
      e.preventDefault();
      $.post('logout.php', { data: '' }, function(data){ 
          window.location.href = "./index.php";
      } );
  });
  //Profile button
  $('#profile_but').click(function(e){
      console.log('profile');
      e.preventDefault();
      $.post('void.php', { data: '' }, function(data){ 
          window.location.href = "./forum/ucp.php?i=173";
      } );
  });
  //Account button
  $('#account_but').click(function(e){
      console.log('account');
      e.preventDefault();
      $.post('void.php', { data: '' }, function(data){ 
          window.location.href = "./forum/ucp.php?i=profile&amp;mode=reg_details";
      } );
  });
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;ul class="nav sub-menu"id='userSUBNAV' style='padding-left:10px;'&gt; 
       &lt;li&gt;&lt;a id='profile_but' href='#'&gt;&lt;span&gt;My Profile&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
       &lt;li&gt;&lt;a id='account_but' href='#'&gt;&lt;span&gt;My Account&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
       &lt;li&gt;&lt;a id='logout' href='#'&gt;&lt;span&gt;Logout&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>The only one that works, is the logout button. The other ones won't even output to the console :3. Could someone explain why?.. and how to fix it?</p>
  
  <p>Also,</p>
  
  <p>logout.php:</p>
  
  <pre><code>&lt;?php
  include 'user_functions.php';
  if(!isLoggedIn()){
      header("Location: index.php");
      exit;
  }
  
  $user-&gt;session_kill();
  echo "Logged out";
  ?&gt;
  </code></pre>
  
  <p>and void.php</p>
  
  <pre><code>&lt;?php echo "void"; ?&gt;
  </code></pre>