title: Two Conflicting jQuery Scripts, Only One Will Work
body: <p>I've got a slideshow that executes when the DOM is ready.</p>
  
  <p>And I've got an external script that loads content from other pages when a link is clicked in the nav.</p>
  
  <p>Well, the slideshow works like a charm, but when you click on a link? Nothing.</p>
  
  <p><strong>If I remove the slideshow script, my AJAX works like a charm, even when I'm testing locally. But when I run both scripts at the same time, my AJAX fails.</strong></p>
  
  <p>Here's the HTML:</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  
  &lt;html lang="en"&gt;
  &lt;head&gt;
     &lt;meta charset="utf-8" /&gt;
     &lt;meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /&gt;
  
     &lt;!-- [if IE]&gt;
     &lt;script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;
     &lt;![endif]--&gt;
  
     &lt;!--[if IE]&gt;&lt;![endif]--&gt;
  
     &lt;link rel="stylesheet" href="css/site-styles.css" /&gt;
  
     &lt;!-- referencing latest version of jquery library --&gt;
     &lt;script src="http://code.jquery.com/jquery-latest.min.js" charset="utf-8"&gt;&lt;/script&gt;
  
     &lt;!-- referencing local js file --&gt;
     &lt;script src="js/scripts.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt;
  
     &lt;!-- referencing cross-slide plugin --&gt;
     &lt;script type="text/javascript" src="js/jquery.cross-slide.min.js"&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
          &lt;div id="container"&gt;
              &lt;header&gt;
                  &lt;img src="img/parlorLogo.png" width="260" height="43" /&gt;
              &lt;h4&gt;&lt;a href=""&gt;To make a reservation, click here&lt;/a&gt;&lt;/h4&gt;
              &lt;/header&gt;
  
      &lt;div id="contentBox"&gt;
          &lt;div id="theContent"&gt;
              &lt;script&gt;
                $(function() {
                  $('#contentBox').crossSlide({
                    sleep: 2,
                    fade: 1,
                    loop: 1
                  }, [
                    { src: 'img/intro1.jpg' },
                    { src: 'img/intro2.jpg' },
                    { src: 'img/intro3.jpg' },
                    { src: 'img/intro4.jpg' },
                    { src: 'img/intro5.jpg' },
                    { src: 'img/intro6.jpg' },
                    { src: 'img/intro7.jpg' },
                    { src: 'img/intro8.jpg' },
                    { src: 'img/intro9.jpg' },
                    { src: 'img/intro10.jpg' },
                    { src: 'img/homeBG.jpg' },
                    { src: 'img/ticker.png' }
                  ]);
                });
              &lt;/script&gt;
          &lt;/div&gt; &lt;!-- theContent --&gt;
          &lt;noscript&gt;Sorry, but you must enable JavaScript to view this site.&lt;/noscript&gt;
      &lt;/div&gt; &lt;!-- contentBox --&gt;
  
      &lt;div class="ws_shadow"&gt;&lt;/div&gt;
      &lt;nav&gt;
          &lt;ul id="mainNav"&gt;
              &lt;li&gt;
                  &lt;h3&gt;
                      &lt;a href="index.html"&gt;HOME&lt;/a&gt;
                  &lt;/h3&gt;
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;h3&gt;
                      &lt;a href="about.html"&gt;ABOUT&lt;/a&gt;
                  &lt;/h3&gt;
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;h3&gt;
                      &lt;a href="photos.html"&gt;PHOTOS&lt;/a&gt;
                  &lt;/h3&gt;
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;h3&gt;
                      &lt;a href="menu.html"&gt;MENU&lt;/a&gt;
                  &lt;/h3&gt;
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;h3&gt;
                      &lt;a href="press.html"&gt;PRESS&lt;/a&gt;
                  &lt;/h3&gt;
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;h3&gt;
                      &lt;a href="privateDining.html"&gt;PRIVATE&amp;nbsp;DINING&lt;/a&gt;
                  &lt;/h3&gt;
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;h3&gt;
                      &lt;a href="contact.html"&gt;CONTACT&lt;/a&gt;
                  &lt;/h3&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/nav&gt;
  &lt;/div&gt; &lt;!-- end container --&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And the external script...</p>
  
  <pre><code>$(document).ready(function() {
  
  $('#mainNav a').click(function(){
  
  var toLoad = $(this).attr('href')+' #theContent';
  $('#theContent').hide('fast',loadContent);
  
  function loadContent() {
      $('#theContent').load(toLoad,'',showNewContent())
  }
  function showNewContent() {
      $('#theContent').show('fast');
  }
  
  return false;
  
  });
  });
  </code></pre>
  
  <p>Can anyone help me out here?</p>
  
  <p>Thanks much,</p>
  
  <p>Adam</p>