Welcome To Snipplr
Everyone's Recent JavaScript Snippets Tagged text
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
« Prev 1 Next »
Sometimes you have some information on your page and your visitors might want to copy it. The easiest way is to provide a mechanism that allows them to simply click a button to do so. You have to paste this code into the head of your web page:
0
984
posted 11 years ago by apphp-snippets
cross-browser way to select all text in a form element, via Jason on Stack Overflow
0
734
posted 12 years ago by charliefmoran
Use whatever is needed to select the input box. $('#searchBoxOuter td.ms-sbcell input') reflects some custom master page html I have so I used that.
0
1310
posted 13 years ago by rumremix
This is probably the first vertical JavaScript text ticker that sues tilted letters. Works with Internet Explorer 6x/7x/8x/9x, Firefox 3.6x, Opera 10.5x and Google Chrome 4x/5x/6x. Older Browsers show no ticker.
0
826
posted 13 years ago by fabulant
This will extend jquery to have a :Contains selector that is case insensitive, the :contains selector remains unchanged.
0
776
posted 14 years ago by magicrebirth
JavaScript
jQuery LimitCharWidth: Allows you to collapse the inner text so that it adjust into specific width.
This plugin allows you to collapse the inner text so that it adjust into specific width or container width.
1
1084
posted 14 years ago by jaff
I just noticed in Firefox 3.5.2 that setting `disabled = true` for a focused text input seems to make it impossible to re-focus after setting `disabled = false`. The solution is to blur it before disabling.
0
1269
posted 15 years ago by cyberhobo
I just put all the functions in here
the validateConfPass function uses the key event and the two text fields to change the background color of the confPassword field when it does not equal the pass field
0
890
posted 15 years ago by jlvallelonga
I made this simple JavaScript to save me time. I was sick of having to thumb-bash on a tiny keypad or login to the slow Clickatell site and use their clunky interface (nothing it simpler than 2 text boxes and an OK button).
You will need an HTTP A...
1
785
posted 16 years ago by mountainash
This utility function attaches listeners to a text field or text area. It supports default text for instructional copy. The original text in the field is used as the instructional/default text. When the box gets focus, it disappears and the user can...
0
787
posted 17 years ago by elli
Trims leading and trailing spaces from a string value and returns the result as a new string.
1
964
posted 17 years ago by splorp
wrap the text that will become a pullquote in a span element and give it the class name "pullquote"
1
819
posted 18 years ago by designerd
JavaScript
Regular Expressions simple strings search/replace escape method (with RE speed enhancment - precompilation)
Usefull Regular Expressions enhancement. Simplifies standard string operations escaping special chars. And also saves precompiled REs for a speed increase.
1
869
posted 18 years ago by cochambre
« Prev 1 Next »