snipt

Ctrl+h for KB shortcuts

JavaScript

toggle blueprint showgrid selector with jquery

1
2
3
4
5
6
// JavaScript Document
$(function(){
		   $("#toggle").click(function (){
			$(".container").toggleClass("showgrid") 
										});
		   });
https://snipt.net/embed/4164ce1492736e452ad0c41304fdb8dc/
/raw/4164ce1492736e452ad0c41304fdb8dc/
4164ce1492736e452ad0c41304fdb8dc
js
JavaScript
6
2019-05-06T16:23:08
True
False
False
/api/public/snipt/2963/
toggle-blueprint-showgrid-selector-with-jquery
<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> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="c1">// JavaScript Document</span> </span><span id="L-2"><a name="L-2"></a><span class="nx">$</span><span class="p">(</span><span class="kd">function</span><span class="p">(){</span> </span><span id="L-3"><a name="L-3"></a> <span class="nx">$</span><span class="p">(</span><span class="s2">&quot;#toggle&quot;</span><span class="p">).</span><span class="nx">click</span><span class="p">(</span><span class="kd">function</span> <span class="p">(){</span> </span><span id="L-4"><a name="L-4"></a> <span class="nx">$</span><span class="p">(</span><span class="s2">&quot;.container&quot;</span><span class="p">).</span><span class="nx">toggleClass</span><span class="p">(</span><span class="s2">&quot;showgrid&quot;</span><span class="p">)</span> </span><span id="L-5"><a name="L-5"></a> <span class="p">});</span> </span><span id="L-6"><a name="L-6"></a> <span class="p">});</span> </span></pre></div> </td></tr></table>
blueprint, jquery, showgrid

HTML

get jQuery from Google

1
2
3
4
5
6
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">google.load('jquery', '1.3.1')</script>

or

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script>
https://snipt.net/embed/98ccbde3fdb59f7061a65951bd47f07d/
/raw/98ccbde3fdb59f7061a65951bd47f07d/
98ccbde3fdb59f7061a65951bd47f07d
html
HTML
6
2019-06-12T13:17:34
True
False
False
/api/public/snipt/2826/
get-jquery-from-google
<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> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="p">&lt;</span><span class="nt">script</span> <span class="na">src</span><span class="o">=</span><span class="s">&quot;http://www.google.com/jsapi&quot;</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;text/javascript&quot;</span><span class="p">&gt;&lt;/</span><span class="nt">script</span><span class="p">&gt;</span> </span><span id="L-2"><a name="L-2"></a><span class="p">&lt;</span><span class="nt">script</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;text/javascript&quot;</span><span class="p">&gt;</span><span class="nx">google</span><span class="p">.</span><span class="nx">load</span><span class="p">(</span><span class="s1">&#39;jquery&#39;</span><span class="p">,</span> <span class="s1">&#39;1.3.1&#39;</span><span class="p">)&lt;/</span><span class="nt">script</span><span class="p">&gt;</span> </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a>or </span><span id="L-5"><a name="L-5"></a> </span><span id="L-6"><a name="L-6"></a><span class="p">&lt;</span><span class="nt">script</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src</span><span class="o">=</span><span class="s">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js&quot;</span><span class="p">&gt;&lt;/</span><span class="nt">script</span><span class="p">&gt;</span> </span></pre></div> </td></tr></table>
google, jquery