Welcome To Snipplr


Everyone's Recent JavaScript Snippets



1 ... 46 47 48 49 50 ... 65
Validating a decimal such as a measurement of time or currency (10.5 or 0.4). This function will return the correct number. If you feed in "10.5foo" the function will spit back 10.5. If you feed in "bar" the function will return nothing.
0 646 posted 15 years ago by blackf0rk
dynamic background images flickers in IE6 *** more ressources: [here](http://misterpixel.blogspot.com/2006/09/forensic-analysis-of-ie6.html) and [here](http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B823727) and [here](http://ajaxia...
0 844 posted 15 years ago by localhorst
Starting from jQuery 1.3
1 903 posted 15 years ago by omixen
Wraps Contextual Product Search of zanox Web Services
0 682 posted 15 years ago by dne
Here's a quick snippet of code to raise the minimum age of your site. Note that it is illegal to lower the legal age of your site under 13. Legal Disclaimer: Affiliate shall indemnify and hold KickApps, its licensors and each such party's parent o...
0 607 posted 15 years ago by krunkosaurus
Can be applied to any element, but is most relevent when applied to an image.
2 790 posted 15 years ago by Unreal
This script stores the elements of the email address as JavaScript variables and assembles them on the fly every time the page loads. The page rendered looks the same to users, but the address never actually lives in the page source code. It can...
0 704 posted 15 years ago by Bluewall
Simple function for turning RETURN key presses into TAB key presses. Focuses input element next in the DOM (usually makes sense), unless we are at the end of the form, at which point it focuses the first element in the form for cyclical purposes.
2 2820 posted 15 years ago by kouphax
Simple jQuery snippet for cleanly and automatically setting up your google analytics
4 849 posted 15 years ago by garside
Thanks to [James]( http://www.girsbrain.org/blog ) for this code.
0 668 posted 15 years ago by zachharkey
object.forEach ========= *Requires JavaScript 1.8* `void object.forEach(function callback(item, value)[, thisObject])`
0 640 posted 15 years ago by Sephr
Get Function Name ============ This will only return (a string) if the object passed to getFunctionName is a function or an "object" function from IE. The function does not rely on function.name if present as it can't always be trusted. Examp...
0 621 posted 15 years ago by Sephr
Simple Javascript that will get a feed and parse it using Ajax
2 904 posted 15 years ago by chrisaiv
1 776 posted 15 years ago by iTony
jQuery client-side form validation for the Radiant CMS mailer extension. Requires jQuery 1.2.6+ Each required field needs a class of "required" assigned to the input tag.
0 817 posted 15 years ago by bcalloway
this function tells you whether or not the passed value is in the passed array
1 860 posted 15 years ago by jlvallelonga
this funciton returns an XMLHttpRequest object for use in ajax pages
1 822 posted 15 years ago by jlvallelonga
This is a script that can parse a URL string, and return all components in a systematic way via an object. This script is very useful in places where you want to link to a page "dynamically" generated by javascript. This is usually done by adding GE...
2 962 posted 15 years ago by jrharshath
cross-browser document.getElementById, should be on top of code.
0 480 posted 15 years ago by sarfraznawaz2005
0 655 posted 15 years ago by davebowker
A very easy to use script for validating your forms.
2 761 posted 15 years ago by sarfraznawaz2005
Rather than using target="_blank", which is deprecated by the W3C in XHTML, you should use rel="external" for links that you want to pop out in a new window. This is the javascript that makes it happen.
0 927 posted 15 years ago by chippper
This snippet assumes that you have a container `div` with an id of "images". It also assumes that each img element inside your container div has the CSS property `visibility: hidden`
0 541 posted 15 years ago by username
1 ... 46 47 48 49 50 ... 65