Welcome To Snipplr


Everyone's Recent Snippets Tagged javascript



Create a simple object and add properties and a method. Note where the object is parsed (not from top to bottom).
2 196 posted 13 years ago by 1man
This utility function attaches listeners to a text field or text area. It supports default text for instructional copy. The original text in the field is used as the instructional/default text. When the box gets focus, it disappears and the user can...
0 208 posted 13 years ago by elli
1 224 posted 13 years ago by skatan
1 231 posted 13 years ago by wintondeshong
0 194 posted 13 years ago by wintondeshong
There must also be a JavaScript function defined in the containing HTML page: function makePopup(url,pop_name,width,height) { window.open(url, pop_name, "width="+width+",height="+height+",resizable=yes,scrollbars=yes"); }
1 230 posted 13 years ago by Bonky
時間帯によって、CSSを切り替える。
0 194 posted 13 years ago by fjm
basic wrapper for jQuery code
4 207 posted 13 years ago by sambody
3 231 posted 13 years ago by Hirmine
I use this snippet to organize my JavaScript files.
0 191 posted 13 years ago by rhlowe
Flash 8 only I think.
0 250 posted 13 years ago by Bonky
This getURL uses javascript to set the browser size.
2 226 posted 13 years ago by mswallace
0 170 posted 14 years ago by voidlock
for firefox
1 247 posted 14 years ago by kyokutyo
addEvent function. Can't remember the exact site i got it from. Works well for me.
1 197 posted 14 years ago by 1man
Shows you how to link 2 objects together via the object function. If a value isn't found in the object, it will look for it in the linked object.
0 180 posted 14 years ago by 1man
Why doesn't this work?
1 194 posted 14 years ago by gaunab
This function allows you to parse a simple XML document(passed to it using this.href on a onclick event). Virtually the same as JSON, the things that have been changed ate labeled !Important.
3 279 posted 14 years ago by 1man
This function is near enough the same as parsing XML. The only things that have changed are the sections marked !important.
3 288 posted 14 years ago by 1man
This function allows you to open a new window, without using any inline Javascript. Simply add rel="external" to the link you wish to open in a new window.
3 295 posted 14 years ago by 1man
In IE5 and IE6 the transparancy in PNG images won't happen at all, so this would fix it. This might come really useful while we are in the era of switching to better standard-friendly browsers.
7 282 posted 14 years ago by iTony