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 1671 posted 17 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 1810 posted 17 years ago by localhorst
Starting from jQuery 1.3
1 2013 posted 17 years ago by omixen
Wraps Contextual Product Search of zanox Web Services
0 1545 posted 17 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 1537 posted 17 years ago by krunkosaurus
Can be applied to any element, but is most relevent when applied to an image.
2 1858 posted 17 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 1696 posted 17 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 4117 posted 17 years ago by kouphax
Simple jQuery snippet for cleanly and automatically setting up your google analytics
4 2066 posted 17 years ago by garside
Thanks to [James]( http://www.girsbrain.org/blog ) for this code.
0 1537 posted 17 years ago by zachharkey
object.forEach ========= *Requires JavaScript 1.8* `void object.forEach(function callback(item, value)[, thisObject])`
0 1584 posted 17 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 1608 posted 17 years ago by Sephr
Simple Javascript that will get a feed and parse it using Ajax
2 2136 posted 17 years ago by chrisaiv
1 1796 posted 17 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 1865 posted 17 years ago by bcalloway
this function tells you whether or not the passed value is in the passed array
1 2018 posted 17 years ago by jlvallelonga
this funciton returns an XMLHttpRequest object for use in ajax pages
1 2068 posted 17 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 2128 posted 17 years ago by jrharshath
cross-browser document.getElementById, should be on top of code.
0 1279 posted 17 years ago by sarfraznawaz2005
0 1628 posted 17 years ago by davebowker
0 1736 posted 17 years ago by davebowker
A very easy to use script for validating your forms.
2 1821 posted 17 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 2361 posted 17 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 1401 posted 17 years ago by username
This snippet contains a text input field called 'abc' and we calling the checkNum function as the onclick action of a button 'btn'
0 2074 posted 17 years ago by juzerali
1 ... 46 47 48 49 50 ... 65