Welcome To Snipplr


Everyone's Recent Snippets Tagged javascript



Script takes links that are not on your domain and opens them in a new window. This code allows for XHTML strict validation and meets Accessibility criteria on opening new windows.
5 105 posted 12 years ago by skatan
Needs object detection to be completely unobtrusive
3 73 posted 12 years ago by skatan
Needs to include object detection to be completely unobtrusive
1 59 posted 12 years ago by skatan
Include JavaSript files.
0 57 posted 12 years ago by Diego
Create a simple object and add properties and a method. Note where the object is parsed (not from top to bottom).
2 77 posted 12 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 88 posted 12 years ago by elli
1 101 posted 12 years ago by skatan
1 81 posted 12 years ago by wintondeshong
0 80 posted 12 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 95 posted 13 years ago by Bonky
時間帯によって、CSSを切り替える。
0 88 posted 13 years ago by fjm
This snippet adds a replaceAll method to the String prototype, so that you can call it later like this: "test string".replaceAll("s", "-"); // returns "te-t -tring"
1 87 posted 13 years ago by alvaroisorna
basic wrapper for jQuery code
4 83 posted 13 years ago by sambody
3 99 posted 13 years ago by Hirmine
I use this snippet to organize my JavaScript files.
0 71 posted 13 years ago by rhlowe
Flash 8 only I think.
0 88 posted 13 years ago by Bonky
This getURL uses javascript to set the browser size.
2 99 posted 13 years ago by mswallace
for firefox
1 112 posted 13 years ago by kyokutyo
addEvent function. Can't remember the exact site i got it from. Works well for me.
1 59 posted 13 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 62 posted 13 years ago by 1man