Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged c



1 ... 32 33 34 35 36 ... 65
Simple template for setting up classes in JS
0 1736 posted 15 years ago by geekyjohn
This requires jQuery. The script checks to see if default text is present in a text field on focus. If it is, then it clears the text. Otherwise, it leaves user entered text intact. This is normally used for a search box.
0 1645 posted 15 years ago by jonkemp
Extremely simple random image when using similar naming structure and a set number of images (eg. imagePrefix_1,jpg, imagePrefix_2,jpg, etc.)
0 1286 posted 15 years ago by d55beck
0 1447 posted 15 years ago by marzsman
0 3041 posted 15 years ago by mrhoo
This is a script [tweeted by @gregmuellegger](http://twitter.com/gregmuellegger/status/16618146398). Example usage: Supports f("Hello %s.", ["World"]) and f("Hello %(name)s.", {name: "World"})
0 1803 posted 15 years ago by glends
0 1760 posted 15 years ago by ekinertac
If you need to sort an array in javascript this is how it should be done. Casting toLowerCase() is optional but but necessary if fx "Anne" was spelled "anne"
0 1559 posted 15 years ago by fengelz
JS to dynamically update year -- good for copyright.
0 1568 posted 15 years ago by mennyj
[via rtcrm] CSS Browser Selector is a very small javascript with just one line and less than 1kb which empower CSS selectors. It gives you the ability to write specific CSS code for each operating system and each browser.
2 1866 posted 15 years ago by mennyj
[via rtcrm] Since HTML5 is getting [more](http://www.brucelawson.co.uk/tests/html5-elements.html) [attention](http://adactio.com/journal/1540/) by way of marking up our new pages, and the only way to get IE to acknowledge the new elements, such as...
0 1607 posted 15 years ago by mennyj
Подскажите готовый скрипт скроллинга картинки: есть большая картинка по ширине. Начинаем вести курсор вправа - двигается вправо. Чем б...
0 1349 posted 16 years ago by stancox
I frequently pass an array of elements from an HTML form to PHP, normally a list of checkboxes for removing database records. This will loop through an array of checkbox's with the same name & build a delimited string from the checked values. Afte...
0 1506 posted 16 years ago by verostudios
based on [http://net.tutsplus.com/tutorials/javascript-ajax/create-a-simple-powerful-product-highlighter-with-mootools/](http://net.tutsplus.com/tutorials/javascript-ajax/create-a-simple-powerful-product-highlighter-with-mootools/)
0 1321 posted 16 years ago by cfleschhut
http://code.google.com/p/domassistant/
0 2079 posted 16 years ago by c4ptivate
1 2541 posted 16 years ago by kossmoss
0 2621 posted 16 years ago by antij
Paste this in address bar a viola!
0 1487 posted 16 years ago by landonmiller
converts date/time that sharepoint kicks out to m/d/y format.
0 1600 posted 16 years ago by rumremix
This is the correct markup for an inline script tag for HTML 4.01 and XHTML 1.0 Note the lack of any "language" attribute since this is deprecated. In HTML 4, the content type is declared as CDATA, which means that entities will not be parsed....
0 1879 posted 16 years ago by PapillonUK
1 ... 32 33 34 35 36 ... 65