<p dir="auto">Operating system:XP W7-32<br>
用bootstrap框架开发出的页面，在浏览器上下拉，翻页等都能实现，用electron不能,这是为什么，请教</p>
<p dir="auto">jQuery contains something along this lines:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="if ( typeof module === &quot;object&quot; &amp;&amp; typeof module.exports === &quot;object&quot; ) {
  // set jQuery in `module`
} else {
  // set jQuery in `window`
}"><pre class="notranslate"><span class="pl-k">if</span> <span class="pl-kos">(</span> <span class="pl-k">typeof</span> <span class="pl-smi">module</span> <span class="pl-c1">===</span> <span class="pl-s">"object"</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-k">typeof</span> <span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">===</span> <span class="pl-s">"object"</span> <span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-c">// set jQuery in `module`</span>
<span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span>
  <span class="pl-c">// set jQuery in `window`</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">module is defined, even in the browser-side scripts. This causes jQuery to ignore the <code class="notranslate">window</code> object and use <code class="notranslate">module</code>, so the other scripts won't find <code class="notranslate">$</code> nor <code class="notranslate">jQuery</code> in global scope..</p>
<p dir="auto">I am not sure if this is a jQuery or atom-shell bug, but I wanted to put this on the web, so others won't search as long as I did.</p>