Welcome To Snipplr
Everyone's Recent Snippets Tagged javascript
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
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
1930
posted 15 years ago by jlizarraga
Lets you get YouTube video scene images by video id or youtube video url using only javascript OR jQuery.
5
1967
posted 15 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
2028
posted 15 years ago by nelsnelson
Super simple output of browser version. Redundantly outputs the same info using both asp and javascript.
0
849
posted 15 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
731
posted 15 years ago by blackf0rk
include document ready and standard code to run swfobject smoothly in IE6
1
868
posted 15 years ago by apro2000
jquery ui/tabs initiation ensures screenreaders can focus content when selecting tabs. Tested using Jaws 8.
3
682
posted 15 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
946
posted 15 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
653
posted 15 years ago by krunkosaurus
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
2895
posted 15 years ago by kouphax
Converts a standard select box to a clickable image thumbnail list.
<code>
<select>
<option>/images/test1.jpg</option>
<option>/images/test2.jpg</option>
</select>
<script>
$('#image').imageSelect();...
1
889
posted 15 years ago by ping_ch
this function tells you whether or not the passed value is in the passed array
1
896
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
1012
posted 15 years ago by jrharshath
cross-browser document.getElementById, should be on top of code.
0
535
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
982
posted 15 years ago by chippper