Welcome To Snipplr

Everyone's Recent jQuery Snippets Tagged forms

« Prev 1 Next »
Adding input values and clearing on focus
1 80 posted 8 years ago by hubbske
Action a link/submit when input is hit with enter button
0 70 posted 8 years ago by hubbske
0 56 posted 9 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 85 posted 9 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 78 posted 9 years ago by accelm
See also the [plain JavaScript version](http://snipplr.com/view/41717/default-value-for-input-fields/).
1 88 posted 9 years ago by riddla
simple jquery code to clear form fields
0 72 posted 9 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 110 posted 9 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 111 posted 9 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 106 posted 9 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 43 posted 9 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 56 posted 9 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 81 posted 10 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 127 posted 10 years ago by Meander365
0 49 posted 10 years ago by landonmiller
1 53 posted 10 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 88 posted 11 years ago by ping_ch
« Prev 1 Next »