Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged html



In regards to progressive enhancement, see also the [jQuery version](http://snipplr.com/view/48275/default-value-for-input-fields-jquery-version/).
6 168 posted 10 years ago by riddla
A more flexible version of the 'official' Facebook feed dialog example. "The Feed Dialog prompts the user to publish an individual story to a profile's feed. This does not require any extended permissions." "The following simple JavaScript exam...
0 167 posted 10 years ago by coprolit
I frequently pass an array of elements from an HTML form to PHP, normally a list of checkboxes for removing database records. This will loop through an array of checkbox's with the same name & build a delimited string from the checked values. Afte...
0 108 posted 10 years ago by verostudios
0 136 posted 10 years ago by gabbo
0 194 posted 10 years ago by Jamie
adopted from: http://www.alistapart.com/articles/makingcompactformsmoreaccessible/
0 138 posted 10 years ago by cfleschhut
0 107 posted 10 years ago by arthipesa
Run in the FireBug console, and copy the output. An odd class is included for row striping, and the number of items can be controlled via the for loop.
1 154 posted 10 years ago by Jamie
Piece of cake and easy to use
0 152 posted 10 years ago by shapeshifta
url: http://www.example.com/?foo=bar usage: $_GET['foo'] // 'bar'
0 96 posted 10 years ago by nate63179
Appcelerator Titanium Mobile is a framework + IDE designed to help you build iPhone applications using only HTML and Javascript. This example shows how to make a simple Ajax request
1 145 posted 10 years ago by chrisaiv
0 129 posted 11 years ago by enchance
Make sure you change the variable v_ga_track near the end of the script.
0 115 posted 11 years ago by chrisjlee
This assumes HTML that looks like this: <pre><code> &lt;div id=&quot;containing_div&quot;&gt; &lt;div id=&quot;div_1&quot; style=&quot;background-color:red&quot; class=&quot;visible_div&quot;&gt; &lt;p&gt;Test Content 1&lt;/p&...
2 101 posted 11 years ago by chippper
I made this class because is was fed up with all those strings with escaped quotes with when building html into an output-string. You could also build a php-version of it.
0 101 posted 11 years ago by leonardreinders
This will only work in FF 3.5 and web-kit browsers. (post 06/20/2009)
0 121 posted 11 years ago by adamdecaf
- a javascript for alternate row/column table striping - supports row hover, column hover and cell hover effects and click events. demo here: http://www.frequency-decoder.com/demo/table-actions/
0 140 posted 11 years ago by beneberle
Adds a class of hasJS to the html element, can be used for CSS styling.
1 152 posted 11 years ago by 1man
0 220 posted 11 years ago by garside
1 86 posted 11 years ago by selfmadepsyche