snipt

Ctrl+h for KB shortcuts
Notice: Snipt is moving away from free accounts on May 1st, 2014. Read more about the transition here.
#20603

HTML

jQuery document ready function

1
2
3
4
5
<script type="text/javascript">
jQuery(document).ready(function($) {
	//$('a[rel*=facebox]').facebox(); // Enable Facebox modal windows
})
</script>
https://snipt.net/embed/4a18830096c07d9cb065dae34d4c0c3f/
https://snipt.net/raw/4a18830096c07d9cb065dae34d4c0c3f/
4a18830096c07d9cb065dae34d4c0c3f
html
HTML
5
2014-04-17T03:33:11
True
False
/api/public/snipt/20603/
jquery-document-ready-function
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span><span class="nt">&gt;</span> </span><span id="L-2"><a name="L-2"></a><span class="nx">jQuery</span><span class="p">(</span><span class="nb">document</span><span class="p">).</span><span class="nx">ready</span><span class="p">(</span><span class="kd">function</span><span class="p">(</span><span class="nx">$</span><span class="p">)</span> <span class="p">{</span> </span><span id="L-3"><a name="L-3"></a> <span class="c1">//$(&#39;a[rel*=facebox]&#39;).facebox(); // Enable Facebox modal windows</span> </span><span id="L-4"><a name="L-4"></a><span class="p">})</span> </span><span id="L-5"><a name="L-5"></a><span class="nt">&lt;/script&gt;</span> </span></pre></div> </td></tr></table>
jquery, js
#20600

HTML

jQuery on Google CDN

<!-- all cdn links can be found on http://scriptsrc.net/ -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
https://snipt.net/embed/2aa2390a82779f69407b0befcd1275b1/
https://snipt.net/raw/2aa2390a82779f69407b0befcd1275b1/
2aa2390a82779f69407b0befcd1275b1
html
HTML
3
2014-04-21T22:10:13
True
False
/api/public/snipt/20600/
jquery-on-google-cdn
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c">&lt;!-- all cdn links can be found on http://scriptsrc.net/ --&gt;</span> </span><span id="L-2"><a name="L-2"></a><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js&quot;</span><span class="nt">&gt;&lt;/script&gt;</span> </span></pre></div> </td></tr></table>
cdn, jquery