Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged javascript



Usage:
1 749 posted 16 years ago by mattkenefick
Just to include and implement the SWFObject to an HTML body from a generic "/js/" directory with some basic varibles. [applies to OLD version of SWF Object]
1 656 posted 16 years ago by mattkenefick
A Tiny JavaScript liberary for Behaviour-Driven Development (BDD).
1 912 posted 16 years ago by ishikawa
This is the javascript file for code which implements the Secure Hash Algorithm 1 as defined in FIPS 180-1 published April 17, 1995.
1 980 posted 16 years ago by ishikawa
It redirects the url with JS.
0 756 posted 16 years ago by skywalker
Slim down the size of your javascript by using these custom functions.
2 739 posted 16 years ago by neal_grosskopf
/* if (globalVariable) { But this wouldn't work. That code is actually checking to see if the defined variable globalVariable has a null value. If the variable has not been defined, that code will cause an error. Instead, here is the code that...
0 608 posted 16 years ago by zha
Note that the comment is part of the code here. IE 5+ (including Mac) will evaluate to true by using conditional compilation.
0 798 posted 16 years ago by cczona
*"Only the elements which are are selected through the $ selector will get the extra DOMAssistant methods added to it."
0 611 posted 16 years ago by cczona
How to use: 1) < script type="text/javascript" src="path-to-file.js"... 2) < body onload="oHW.preMontar('img1_on.jpg','img2_on.jpg','img3_on.jpg');"... 3) < a href="#" onmouseout="oHW.Restore()" onmouseover="oHW.Cambiar('mnind','img1_on.jpg'...
2 1010 posted 16 years ago by hellion
I got this code from http://blog.vishalon.net/Post/57.aspx The actual two methods required are function doGetCaretPosition (ctrl) { var CaretPos = 0; // IE Support if (document.selection) { ctrl.focus (); var Sel = document.select...
3 4325 posted 16 years ago by arunpjohny
/* ---===[ EXAMPLE ]===--- */ var TT = new AssociativeArray(); TT.add("k-1", "Value 1"); TT.add("k-2", "Value 2"); TT.add("k-3", "Value 3"); TT.add("k-4", "Value 4"); alert(TT.to_string());
1 632 posted 16 years ago by vbert
/* --==[ EXAMPLE ]==-- var colors = new AArray(); colors.add("k01", {bk:"#fff",tk:"b",it:"hello"}); var oC = colors.get("k01"); var tT = ''; for(K in oC) tT += "[" + K + "]: " + oC[K] + "\n"; tT += "\n\n"; tT += oC.bk + "\n"; tT += oC...
1 975 posted 16 years ago by vbert
0 966 posted 16 years ago by Victoor
This makes it easy to retrieve certain value from a url with different values appended to it.
0 959 posted 16 years ago by iTony
prevent errors in other browsers
0 914 posted 16 years ago by localhorst
This would make IE treat the hover element in whichever tag you implemented.
0 493 posted 16 years ago by iTony
0 576 posted 16 years ago by otaqui
1 774 posted 16 years ago by m00min
0 765 posted 16 years ago by iTony
Found this quick little bit of code on the Google jQuery discussion group. It simply fades the background image of a link you have hovered over to a certain color, then fades it back to the original color.
4 888 posted 16 years ago by 1man
This script can help you control the scroll of div by a simple function. Set thr property 'scrollTop' then the scoll can be controlled.
1 1242 posted 16 years ago by multani
0 791 posted 16 years ago by iTony