snipt

Ctrl+h for KB shortcuts

HTML

Bootstrap Search Bar

1
2
3
4
<form class="navbar-search pull-right input-append">
    <input class="span2" id="appendedInputButtons" type="search">
    <button class="btn" type="button">Search</button>
</form>
https://snipt.net/embed/40dd9ff880f026cd3d6c3c0d506da888/
https://snipt.net/raw/40dd9ff880f026cd3d6c3c0d506da888/
40dd9ff880f026cd3d6c3c0d506da888
html
HTML
4
2016-09-30T09:07:27
True
False
False
Nov 13, 2013 at 11:08 AM
/api/public/snipt/93939/
bootstrap-search-bar
<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 id="L-1"><a name="L-1"></a><span class="nt">&lt;form</span> <span class="na">class=</span><span class="s">&quot;navbar-search pull-right input-append&quot;</span><span class="nt">&gt;</span> </span><span id="L-2"><a name="L-2"></a> <span class="nt">&lt;input</span> <span class="na">class=</span><span class="s">&quot;span2&quot;</span> <span class="na">id=</span><span class="s">&quot;appendedInputButtons&quot;</span> <span class="na">type=</span><span class="s">&quot;search&quot;</span><span class="nt">&gt;</span> </span><span id="L-3"><a name="L-3"></a> <span class="nt">&lt;button</span> <span class="na">class=</span><span class="s">&quot;btn&quot;</span> <span class="na">type=</span><span class="s">&quot;button&quot;</span><span class="nt">&gt;</span>Search<span class="nt">&lt;/button&gt;</span> </span><span id="L-4"><a name="L-4"></a><span class="nt">&lt;/form&gt;</span> </span></pre></div> </td></tr></table>
bootstrap, nav, search

JavaScript

Slide down navigation

1
2
3
4
5
6
7
8
$('#nav ul li').hover(function(){
	$(this).addClass('hover');
	$(this).children('ul').stop(true,true).fadeIn(300);
},
function() {
	$(this).children('ul').delay(200).fadeOut(300);
	$(this).removeClass('hover');
});
https://snipt.net/embed/f207904ab6c9562a0266bea0a4d4c88b/
https://snipt.net/raw/f207904ab6c9562a0266bea0a4d4c88b/
f207904ab6c9562a0266bea0a4d4c88b
js
JavaScript
8
2016-10-01T07:29:58
True
False
False
/api/public/snipt/58631/
slide-down-navigation
<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> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="nx">$</span><span class="p">(</span><span class="s1">&#39;#nav ul li&#39;</span><span class="p">).</span><span class="nx">hover</span><span class="p">(</span><span class="kd">function</span><span class="p">(){</span> </span><span id="L-2"><a name="L-2"></a> <span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">addClass</span><span class="p">(</span><span class="s1">&#39;hover&#39;</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="k">this</span><span class="p">).</span><span class="nx">children</span><span class="p">(</span><span class="s1">&#39;ul&#39;</span><span class="p">).</span><span class="nx">stop</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="kc">true</span><span class="p">).</span><span class="nx">fadeIn</span><span class="p">(</span><span class="mi">300</span><span class="p">);</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="kd">function</span><span class="p">()</span> <span class="p">{</span> </span><span id="L-6"><a name="L-6"></a> <span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">children</span><span class="p">(</span><span class="s1">&#39;ul&#39;</span><span class="p">).</span><span class="nx">delay</span><span class="p">(</span><span class="mi">200</span><span class="p">).</span><span class="nx">fadeOut</span><span class="p">(</span><span class="mi">300</span><span class="p">);</span> </span><span id="L-7"><a name="L-7"></a> <span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">removeClass</span><span class="p">(</span><span class="s1">&#39;hover&#39;</span><span class="p">);</span> </span><span id="L-8"><a name="L-8"></a><span class="p">});</span> </span></pre></div> </td></tr></table>
hover, javascript, jquery, menu, nav, navigation, slide

HTML

A simple sub nav bar

1
2
3
4
5
6
<dl class="sub-nav">
  <dt>Filter:</dt>
  <dd class="active"><a href="#">All</a></dd>
  <dd><a href="#">Active</a></dd>
  <dd><a href="#">Pending</a></dd>
</dl>
https://snipt.net/embed/f05cca3ec55b4de8d2f5090e8e790fa9/
https://snipt.net/raw/f05cca3ec55b4de8d2f5090e8e790fa9/
f05cca3ec55b4de8d2f5090e8e790fa9
html
HTML
6
2016-09-22T17:17:44
True
False
False
/api/public/snipt/34896/
a-simple-sub-nav-bar
<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 id="L-1"><a name="L-1"></a><span class="nt">&lt;dl</span> <span class="na">class=</span><span class="s">&quot;sub-nav&quot;</span><span class="nt">&gt;</span> </span><span id="L-2"><a name="L-2"></a> <span class="nt">&lt;dt&gt;</span>Filter:<span class="nt">&lt;/dt&gt;</span> </span><span id="L-3"><a name="L-3"></a> <span class="nt">&lt;dd</span> <span class="na">class=</span><span class="s">&quot;active&quot;</span><span class="nt">&gt;&lt;a</span> <span class="na">href=</span><span class="s">&quot;#&quot;</span><span class="nt">&gt;</span>All<span class="nt">&lt;/a&gt;&lt;/dd&gt;</span> </span><span id="L-4"><a name="L-4"></a> <span class="nt">&lt;dd&gt;&lt;a</span> <span class="na">href=</span><span class="s">&quot;#&quot;</span><span class="nt">&gt;</span>Active<span class="nt">&lt;/a&gt;&lt;/dd&gt;</span> </span><span id="L-5"><a name="L-5"></a> <span class="nt">&lt;dd&gt;&lt;a</span> <span class="na">href=</span><span class="s">&quot;#&quot;</span><span class="nt">&gt;</span>Pending<span class="nt">&lt;/a&gt;&lt;/dd&gt;</span> </span><span id="L-6"><a name="L-6"></a><span class="nt">&lt;/dl&gt;</span> </span></pre></div> </td></tr></table>
nav, sub

CSS

nav background image

url(images/nav/nav_bg.gif) repeat-x bottom left;
https://snipt.net/embed/09aba49d2ef26a01867e97fdea9cd242/
https://snipt.net/raw/09aba49d2ef26a01867e97fdea9cd242/
09aba49d2ef26a01867e97fdea9cd242
css
CSS
1
2016-10-01T08:40:40
True
False
False
/api/public/snipt/1939/
nav-background-image
<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 id="L-1"><a name="L-1"></a><span class="nt">url</span><span class="o">(</span><span class="nt">images</span><span class="o">/</span><span class="nt">nav</span><span class="o">/</span><span class="nt">nav_bg</span><span class="nc">.gif</span><span class="o">)</span> <span class="nt">repeat-x</span> <span class="nt">bottom</span> <span class="nt">left</span><span class="o">;</span> </span></pre></div> </td></tr></table>
css, image, nav
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.