Welcome To Snipplr
Everyone's Recent jQuery Snippets Tagged text
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
« Prev 1 Next »
A little snippet that I use to hide or show text using jquery
1
699
posted 10 years ago by TwistedEinstein
Simple function to include in your script to enable multi-line text-overflow.
See the jsfiddle (http://jsfiddle.net/eAyyL/) for details on the necessary CSS and HTML layout.
0
778
posted 10 years ago by JoshChris
A simple way of displaying a random list item. Could be used to randomly display anything.
Demo: jsfiddle.net/uRd6N/ (keep clicking run)
0
1621
posted 10 years ago by i-am-andy
This can come in handy for a reset or cancel button. You can clear all inputs within a single div in one line of code. Pretty sexy.
0
738
posted 11 years ago by mattvbiggs
Clear all text fields on focus based on original value with single function. The code checks for a 'title' attribute on each input with class 'text' and compares this to the current value of the field.
0
841
posted 11 years ago by Huskie
This snippet describes how to fill select html element with Text, Value pairs
where 'Text' is displayed to the user and 'Value' is actual value to be processed.
0
585
posted 12 years ago by Neven
jQuery to set the width of some text to the width of a given element.
0
691
posted 12 years ago by Narthur
simple jquery plugin that powers the text auto-resizing that is the basis of textagon.com
0
507
posted 12 years ago by secretgspot
This snippet will replace any "&" within the text of the container your specify with a <span> that you can target with CSS; fancy!
0
424
posted 13 years ago by dtigraphics
very minimal way to get the value and text of a combo box using jquery
1
543
posted 13 years ago by blipz
Just a quick script to enable default text within a form element to be cleared or restored upon focus/blur of a particular element.
Should give you roughly the same functionality as the new HTML5 webforms "placeholder" attribute.
0
567
posted 13 years ago by scheurbert
Example markup:
<p>This is the first part of the text <a class="toggle">[+]</a><span>this part is hidden until clicking the toggle link.</span></p>
The script will show and hide text when the toggle link is c...
1
495
posted 14 years ago by mikemetcalf
Removed a certain word from a list of links (purely for design reasons). Link length way to long with the link included.
1
969
posted 15 years ago by 1man
« Prev 1 Next »