title: How to fix “element.dispatchEvent is not a function” without breaking something else?
body: <p>I have same problem as <a href="https://stackoverflow.com/questions/980697/element-dispatchevent-is-not-a-function-js-error-caught-in-firebug-of-ff3-0">&quot;element.dispatchEvent is not a function&quot; js error caught in firebug of FF3.0</a> but in google chrome.</p>
  
  <p>I have wrote <code>&lt;script&gt;jQuery.noConflict();&lt;/script&gt;</code>
  after all scripts. But now I have another problem:</p>
  
  <pre><code>  ...
    $("a.try").click(function () {
    ...
  </code></pre>
  
  <p>undefined is not a function</p>
  
  <p>and </p>
  
  <pre><code> ...
   var blockHeight = $(window).height();
   ...
  </code></pre>
  
  <p>undefined is not a function</p>
  
  <p>Thus first fix is not valid.</p>
  
  <p>P.S.</p>
  
  <p>html part where I include scripts:</p>
  
  <pre><code>....
  &lt;script type="text/javascript"
          src="http://html5shim.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;
  &lt;![endif]--&gt;
  &lt;script type="text/javascript"
          src="&lt;c:url value='/resources/js/underscore.js'/&gt;"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"
          src="&lt;c:url value='/resources/js/jquery-1.8.2.min.js'/&gt;"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"
          src="&lt;c:url value='/resources/js/jquery.mousewheel.js'/&gt;"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"
          src="&lt;c:url value='/resources/js/popup.js'/&gt;"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"
          src="&lt;c:url value='/resources/js/jquery.jscrollpane.min.js'/&gt;"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"
          src="&lt;c:url value='/resources/js/scroll-startstop.events.jquery.js'/&gt;"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"
          src="&lt;c:url value='/resources/js/jquery-ui-1.10.0.custom.min.js'/&gt;"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"
          src="&lt;c:url value='/resources/js/script-ini.js'/&gt;"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"
          src="&lt;c:url value='/resources/js/map/map.js'/&gt;"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"
          src="//maps.google.com/maps/api/js?sensor=true&amp;js?v=3.exp&amp;libraries=places"&gt;&lt;/script&gt;
  
  &lt;script type="text/template" id="terminal-template"&gt;
      ...
  &lt;/script&gt;
  &lt;style&gt;
      .grey-terminal {
          background-color: rgb(226, 226, 226);
      }
  &lt;/style&gt;
  &lt;script type="text/javascript"
          src="&lt;c:url value='/resources/js/addTerminal.js'/&gt;"&gt;&lt;/script&gt;
  &lt;script&gt;jQuery.noConflict();&lt;/script&gt;
  ...
  </code></pre>
  
  <p>Can you advise another way?</p>