Welcome To Snipplr


Everyone's Recent JavaScript Snippets



Vert useful function since there isn't an insertAfter function in the DOM. Call it inside scripts, it expects insertAfter(*the new element to be inserted*, *the element you want it to be inserted after*);
3 1416 posted 15 years ago by 1man
when testing forms you don't always want to fill in dummydate this is a function i used to autofill and select values.
1 424 posted 15 years ago by assbach
Handy for after submitting a form or moving sites and wanting to tell users about the change. Just change the URL (can be absolute or relative) and the timeout. Shown here as 5 seconds.
5 691 posted 15 years ago by mountainash
Trims leading and trailing spaces from a string value and returns the result as a new string.
1 596 posted 15 years ago by splorp
paste above in HEAD tag
1 416 posted 15 years ago by clapfouine
in javascript use, for example: myJsonObject["js007"].firstname + ' ' + myJsonObject["js007"].lastnamename to return James Bond
1 490 posted 15 years ago by markireland
This is a prototype based method for loading functions, this is an alternative to using window.onload = function();
1 403 posted 15 years ago by vanne
Helps identify correctly the type of whatever you put as an argument. This was adapted from http://www.planetpdf.com/developer/article.asp?ContentID=testing_for_object_types_in_ja
3 507 posted 15 years ago by rolandog
交互に背景色を変えるスクリプト. XHTML basic templateと合わせて参考にどうぞ. 本当はCSSクラスを振って, スタイルはCSSで付けたほうがいいけど取り急ぎ.
1 384 posted 15 years ago by masaya
Mirror of library
2 1376 posted 15 years ago by jmah
Simple extension of the string method using string.prototype.
1 434 posted 15 years ago by 1man
run at pukiwiki and bwiki(xoops module)
0 395 posted 15 years ago by kyokutyo
Makes the comment box on a xanga entry transparent
2 524 posted 15 years ago by sondosia
Removes the ad at the top of a xanga page; place in Webstats below all other codes This one actually works, even in Opera and Firefox,
2 475 posted 15 years ago by sondosia
In Internet Explorer, it's a well-known issue that tags are rendered above other layers and things like drop-down menus. This fix is specifically for the "Son of Suckerfish" drop-down menus (see URL), which are entirely CSS-based (JS is needed only...
1 573 posted 15 years ago by Todd
toggle a div via JS/CSS style
2 396 posted 15 years ago by assbach
Evitar que en el código de la página se pueda ver “[email protected]”.
2 559 posted 15 years ago by Hirmine
Open some internet-page with some pictures on it. Then just paste this text into the address line and press "Enter". Works good only in IE, sometimes in Opera...
0 355 posted 16 years ago by Memphys
Replaces a DOM Element with another, but keeps the classes and IDs of the old one.
3 574 posted 16 years ago by gaunab
The code for inserect the Search Box (of Apple Search) on your webpages
0 406 posted 16 years ago by philapple
0 342 posted 16 years ago by ebukva
This is a website specific script... pops up the source of an OPML file with 145+ podcasts. http://www.productivity501.com/2006/11/free_academic_p.html Note: The 'bookmarklet' format is included as a comment at the bottom... (write in a webpage a...
1 381 posted 16 years ago by rolandog
1 486 posted 16 years ago by gaunab
This I will use for popping up the login and profile info
1 455 posted 16 years ago by iTony