Welcome To Snipplr


Everyone's Recent jQuery Snippets Tagged forms



« Prev 1 Next »
Adding input values and clearing on focus
1 678 posted 12 years ago by hubbske
Action a link/submit when input is hit with enter button
0 607 posted 12 years ago by hubbske
0 465 posted 12 years ago by soup
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
If included in a global javascript, whenever an input receives focus it will clear the default value. If the element loses focus without any user input then it will put the default value back in there. Useful for when you aren't using <label> a...
0 529 posted 13 years ago by accelm
See also the [plain JavaScript version](http://snipplr.com/view/41717/default-value-for-input-fields/).
1 711 posted 13 years ago by riddla
simple jquery code to clear form fields
0 542 posted 13 years ago by jelontok
Show a form field if 1 value from a dropdown is chosen, hide is the other is chosen. Can be extended to include more fields and values. Could get messy if you start nesting more than 2 'if else' but it gets the job done.
0 975 posted 13 years ago by Rembrand
Originally from http://www.electrictoolbox.com (see src)\r\nClear the default value of a form field when you click on it (when you want to type) and put it back if you leave without typing anything.
1 855 posted 13 years ago by Rembrand
Originally form http://www.electrictoolbox.com\r\nComes in handy if you want to display a message in the field (\\\"type your password\\\") but mask the password itself.
1 769 posted 13 years ago by Rembrand
Display a default value in a text field that disappears on focus and reappears on blur **if** the field is blank.
0 424 posted 13 years ago by prsjohnny
A jQuery snippet to make form inputs show a help message which disappears on click (and comes back when the user enters nothing). Give your input the classes ‘remember’ to activate the snippet and (optionally) ‘unfocused’ as a CSS hook for ch...
2 546 posted 13 years ago by iqwebdev
Keeping track of complex forms - especially those that exist within multiple jQuery UI tabs - can be a pain. This is a simple little function that will reorganize all visible inputs, buttons, drop-downs and links. Use it whenever switching between ta...
0 474 posted 14 years ago by tbelknap
I was recently faced with the problem of setting focus to the next input field. The challenge was that I didn’t know what that field was. So given an input field, find the next logical (in the order of the DOM) input field and set focus. I came up...
1 952 posted 14 years ago by Meander365
0 573 posted 14 years ago by landonmiller
3 660 posted 14 years ago by mauricenaef
1 548 posted 14 years ago by jonniespratley
Converts a standard select box to a clickable image thumbnail list. <code> &lt;select&gt; &lt;option&gt;/images/test1.jpg&lt;/option&gt; &lt;option&gt;/images/test2.jpg&lt;/option&gt; &lt;/select&gt; &lt;script&gt; $('#image').imageSelect();...
1 674 posted 15 years ago by ping_ch
« Prev 1 Next »