Welcome To Snipplr
Everyone's Recent Snippets Tagged javascript
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
The AJAX Libraries API is a content distribution network and loading architecture for the most popular, open source JavaScript libraries.
1
808
posted 14 years ago by jonkemp
The Location object is part of a Window object and is accessed through the window.location property. It contains the complete URL of a given Window object, or, if none is specified, of the current Window object.
0
677
posted 14 years ago by jonkemp
Although $(document).ready is incredibly useful, it occurs during page render while objects are still downloading. You can reduce CPU utilization during the page load by binding your jQuery functions to the $(window).load event, which occurs after al...
2
700
posted 14 years ago by jonkemp
Use chaining in jQuery to reduce the code size and gain better performance.
0
687
posted 14 years ago by jonkemp
This is a simple way to scroll to the top of the page, when an anchor tag has been clicked. Note that we must "return false," in order to disable the default browser action.
1
1509
posted 14 years ago by Nettuts
via [http://mir.aculo.us/2010/06/04/making-an-ipad-html5-app-making-it-really-fast/](http://mir.aculo.us/2010/06/04/making-an-ipad-html5-app-making-it-really-fast/)
for CSS3 Transitions, Transforms, Animation also see:
[http://css3.bradshawenterp...
0
712
posted 14 years ago by cfleschhut
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
831
posted 14 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
652
posted 14 years ago by d55beck
The bare minimum required tags in the head tag of any HTML doc...
1
1044
posted 14 years ago by jaymanpandya
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
869
posted 14 years ago by glends
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
832
posted 14 years ago by fengelz
forms part of our Calibre Remote. an alternate gui for calibre ebooks content-server.
0
590
posted 14 years ago by minky
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
623
posted 14 years ago by cfleschhut
- Fully compatible with all browsers and iPhone/iPad
- Letterboxes vertically oriented images
- Standalone: no library needed, no conflicts needed and speedy
- VERY light weight (under 3KB for uncompressed css and javascript)
- Easy to integrate...
3
1214
posted 14 years ago by kirie
*language: beanshell*
be sure to adapt your YUICompressor path
0
743
posted 14 years ago by birdspider