Welcome To Snipplr


Everyone's Recent Snippets Tagged javascript



1 ... 33 34 35 36 37 ... 46
One of those common tools that's easy to forget about is the Modulus operator (%), which returns the remainder of a division operation. If you divide some number by two, a remainder of 0 indicates an even number, while a remainder of 1 indicates a...
1 2275 posted 16 years ago by jlizarraga
Open external links in new window.
0 1034 posted 16 years ago by Ashung
Lets you get YouTube video scene images by video id or youtube video url using only javascript OR jQuery.
5 2268 posted 16 years ago by Uzbekjon
Here is a small function [[lobo235](http://www.netlobo.com/javascript_tooltips.html "Javascript Tool-tips")] wrote that will parse the window.location.href value and return the value for the parameter you specify. It does this using javascript's buil...
1 2866 posted 16 years ago by nelsnelson
Super simple output of browser version. Redundantly outputs the same info using both asp and javascript.
0 1089 posted 16 years ago by squaretone
If you want to have a JavaScript confirmation alert to popup before executing the codebehind (e.g. asking the user if they really want to delete a record):
1 985 posted 16 years ago by blackf0rk
include document ready and standard code to run swfobject smoothly in IE6
1 1143 posted 16 years ago by apro2000
jquery ui/tabs initiation ensures screenreaders can focus content when selecting tabs. Tested using Jaws 8.
3 900 posted 16 years ago by terrencewood
This is sometimes not the best solution to a server caching your css files. But if you want to force a stubborn server to serve the most recent css file to the browser this seems to work. Could slow things down a touch, but for small css files not...
1 1209 posted 16 years ago by jadedbat
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 885 posted 16 years ago by krunkosaurus
5 1178 posted 16 years ago by johnloy
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 3195 posted 16 years ago by kouphax
Converts a standard select box to a clickable image thumbnail list. <code> &lt;select&gt; &lt;option&gt;/images/test1.jpg&lt;/option&gt; &lt;option&gt;/images/test2.jpg&lt;/option&gt; &lt;/select&gt; &lt;script&gt; $('#image').imageSelect();...
1 1133 posted 16 years ago by ping_ch
1 1040 posted 16 years ago by iTony
this function tells you whether or not the passed value is in the passed array
1 1121 posted 16 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 1253 posted 16 years ago by jrharshath
cross-browser document.getElementById, should be on top of code.
0 734 posted 16 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 1264 posted 16 years ago by chippper
1 ... 33 34 35 36 37 ... 46