Snipt.net is closing on December 31st, 2016

For more information, please visit this blog post.

snipt

Ctrl+h for KB shortcuts

JavaScript

Fancybox open from needed index

$.fancybox.open($('.fancybox'), {index: 0});
https://snipt.net/embed/4d744b9fa5a28fda34ebe36ec7df5f47/
https://snipt.net/raw/4d744b9fa5a28fda34ebe36ec7df5f47/
4d744b9fa5a28fda34ebe36ec7df5f47
js
JavaScript
1
2016-12-09T16:58:13
True
False
False
Mar 22, 2014 at 07:02 AM
/api/public/snipt/123027/
fancybox-open-from-needed-index
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nx">$</span><span class="p">.</span><span class="nx">fancybox</span><span class="p">.</span><span class="nx">open</span><span class="p">(</span><span class="nx">$</span><span class="p">(</span><span class="s1">&#39;.fancybox&#39;</span><span class="p">),</span> <span class="p">{</span><span class="nx">index</span><span class="o">:</span> <span class="mi">0</span><span class="p">});</span> </span></pre></div> </td></tr></table>
box, fancy, fancybox, gallery, image, images, jquery, modal, plugin

HTML

Boksy wiadomo?ci

1
2
3
4
<div class="alert-box [success warning error]">
   This is a [success warning error] alert (div.alert-box.success).
   <a href="" class="close">&times;</a>
</div>
https://snipt.net/embed/9e517dbf2668b58957a76f35db1d6625/
https://snipt.net/raw/9e517dbf2668b58957a76f35db1d6625/
9e517dbf2668b58957a76f35db1d6625
html
HTML
5
2016-12-03T21:41:03
True
False
False
/api/public/snipt/33570/
boksy-wiadomosci
<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></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">div</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;alert-box [success warning error]&quot;</span><span class="p">&gt;</span> </span><span id="L-2"><a name="L-2"></a> This is a [success warning error] alert (div.alert-box.success). </span><span id="L-3"><a name="L-3"></a> <span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;&quot;</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;close&quot;</span><span class="p">&gt;</span><span class="ni">&amp;times;</span><span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span> </span><span id="L-4"><a name="L-4"></a><span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span> </span></pre></div> </td></tr></table>
box, wiadomo?ci

CSS

CSS box model fix

1
2
3
4
5
6
7
Fix for the crazy CSS 2 box model

-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box;    /* Firefox, other Gecko */
box-sizing: border-box;         /* Opera/IE 8+ */

Not supported in IE6 and IE7
https://snipt.net/embed/17b46dff5a4db622c1205e97bb0d3869/
https://snipt.net/raw/17b46dff5a4db622c1205e97bb0d3869/
17b46dff5a4db622c1205e97bb0d3869
css
CSS
7
2016-12-09T14:52:17
True
False
False
/api/public/snipt/27319/
css-box-model-fix
<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> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nt">Fix</span> <span class="nt">for</span> <span class="nt">the</span> <span class="nt">crazy</span> <span class="nt">CSS</span> <span class="nt">2</span> <span class="nt">box</span> <span class="nt">model</span> </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="nt">-webkit-box-sizing</span><span class="o">:</span> <span class="nt">border-box</span><span class="o">;</span> <span class="c">/* Safari/Chrome, other WebKit */</span> </span><span id="L-4"><a name="L-4"></a><span class="nt">-moz-box-sizing</span><span class="o">:</span> <span class="nt">border-box</span><span class="o">;</span> <span class="c">/* Firefox, other Gecko */</span> </span><span id="L-5"><a name="L-5"></a><span class="nt">box-sizing</span><span class="o">:</span> <span class="nt">border-box</span><span class="o">;</span> <span class="c">/* Opera/IE 8+ */</span> </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a><span class="nt">Not</span> <span class="nt">supported</span> <span class="nt">in</span> <span class="nt">IE6</span> <span class="nt">and</span> <span class="nt">IE7</span> </span></pre></div> </td></tr></table>
box, css, model
Copyrighted, illegal, or inappropriate content? Email [email protected].