Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Sets the current element of a dropdown to the default option.
<select>
<option>Afrikaans</option>
<option>English</option>
</select>
0
517
posted 12 years ago by sanbor
After being tasked with creating inputs like those on the twitter homepage I came up with this inline label system that uses jquery to control the labels (in the vase of the example it fase and slides them).
The code is in three parts. First, the...
0
667
posted 12 years ago by FatFolderDesigner
.net 3.0+, To create stability in your code, you must check all inputs into a method to make sure they are valid . Often people overlook this step because of laziness, or because they aren't convinced that exceptions and assertions are actually in pl...
0
674
posted 12 years ago by bryanlyman
Inspired: http://evan-roth.com/personal-internet-cache-archive/
In the "style=" you can adjust the "height: ??px" according to the quantity of items in your cache.
0
576
posted 12 years ago by valessiobrito
If you want to simulate someone clicking on a link, use location.href. If you want to simulate an HTTP redirect, use location.replace.
0
622
posted 12 years ago by vagrantradio
ssh localhost -CgL 8080(your computer IP address or name):80
0
743
posted 12 years ago by inreflection7
Empties the keyboard buffer. Useful to discard keyboard input during a command execution inside a bash script.
Try this script without this line:
read -t 0.1 -N 255
and enter any garbage ([ENTER] and all) during these 2 seconds window...
Th...
0
652
posted 12 years ago by niglesias