1 2 3 4
setDefaults = Behavior.create({ initialize: function(obj) { myforms = this.element; ...
JavaScript Highlight Selected forms, S...
by openid.aol.com/forwardfootmedia,
October 10, 2008 01:49,
1 refactoring, tagged with prototype, lowpro, Ruby on Rails, javascript
1 2 3 4
Q = jQuery.noConflict(); Q(document).ready(function(){ ...
JavaScript Toggle "Check all / Un...
by chovy.myopenid.com,
October 06, 2008 20:16,
1 refactoring, tagged with javascript html jquery toggler
I have a simple toggler to ...
1 2 3 4
var hash = new String(document.location).indexOf("#"); if(hash > 0) { ...
JavaScript Small Javascript Code
by openid.aol.com/aviewanew,
October 06, 2008 01:20,
6 refactorings, tagged with ajax, javascript, history
It's for detecting if you'r...
1 2 3 4
function state_classes(updateall) { var value = display.value * 1, tempcolor; for (var i = 1; i <= 118; i++) { ...
JavaScript Color elements by state of ...
Logic is cheap and DOM is e...
1 2 3 4
//msg is the string to show in the alert. //obj is the input to focus function msgFocus(msg, obj){ ...
JavaScript Setting focus after alert
I don't know why, after an ...
1 2 3 4
/** * http://www.openjs.com/scripts/events/keyboard_shortcuts/ * Version : 2.01.B ...
JavaScript Handling Keyboard Shortcuts...
by Tien Dung,
July 29, 2008 09:30,
1 refactoring
I found below code very use...
1 2 3 4
this.getHttpRequest(identifier).onreadystatechange = function() { try { ajaxChat.handleResponse(identifier); ...
JavaScript AJAX makeRequest
This code crashes Firefox 3...
1 2 3 4
function toHTML(code) { code = removeTags(code) code = convertTables(code) ...
JavaScript Markdown-like editor
Hey all, I've created a Mar...
1 2 3 4
$.fn.textNodes = function() { var ret = []; this.each( function() { ...
JavaScript [jQuery] All descendent tex...
This function returns a jQu...
1 2 3 4
javascript: popw=window.open('','Tarpipe micro-post','width=800,height=150'); popw.focus(); ...
JavaScript Tarpipe to twitter, jaiku a...
<a href="http://tarpipe.com...
1 2 3 4
<div id="countdown"></div> <div id="notifier"></div> ...
JavaScript countdown timer (minutes &a...
by Jermaine,
May 27, 2008 09:57,
11 refactorings
Hello Everyone.
I'm trying...
1 2 3 4
//Given a date, returns a new date object that contains the start of the week function startOfWeek(d){ var beg = new Date(d); ...
JavaScript Week Of Date
The code takes a date objec...
1 2 3 4
function calc_color(value, start, end, min, max) { var n = (value - min) / (max - min); var s = parseInt(start.replace("#", ""), 16); ...
JavaScript Hex color between two colors
Watch out for edge cases, l...
1 2 3 4
javascript:(function(){ var elm = document.getElementsByTagName("img"); for (var i = 0; i < elm.length; i++) { ...
JavaScript Zoom all image files from s...
This one comes straight fro...
1 2 3 4
javascript: popw=''; y=window; ...
JavaScript Mathtex bookmarklet
Join the lines and save it ...
1 2 3 4
function odump(object, depth, max){ depth = depth || 0; max = max || 2; ...
JavaScript Recursively dump an object
Given an object, iterate th...
1 2 3 4
check out: http://www.thethirteenthstory.com/WFCINC/site/ the menus grow in IE, fine in all other browsers ...
JavaScript growing menus ?
i know this isn't a help fo...
1 2 3 4
function showEMail() { var e = [ 'm','y','e','m','a','i','l','@','x','y','z','.','c','o','m' ]; var s = ''; ...
JavaScript Anti-spam Mailto
Here's a straightforward an...
1 2 3 4
<html> <head> <title>My Experiment</title> ...
JavaScript How to Refactor from a Loop...
by Jermaine,
December 31, 2007 09:59,
17 refactorings
Hi Everyone,
I'm having...
1 2 3 4
/* Example Usage: new ImagePreloader({ ...
JavaScript Image Preloader
by getopenid.com/deleteme,
December 26, 2007 20:34,
No refactoring, tagged with javascript, image, preloader, images
I'm looking at the 'createI...
1 2 3 4
<html> <head> <title>Print Image Only</title> ...
JavaScript print an image
by cuaddu.myopenid.com,
December 26, 2007 15:30,
4 refactorings
Hi! I was searching a solut...
1 2 3 4
function full_reset(form) { cost_per_unit.innerHTML = "" charge_per_unit.innerHTML = "" ...
JavaScript Repetitive Calculator Code
I am almost embarrassed to ...
1 2 3 4
function startup() { setInterval(”pinger(’live’,0)”,10000); setInterval(”pinger(’standby’,1)”,10000); ...
JavaScript Javascript threading
by Dan Simard,
December 06, 2007 14:06,
6 refactorings
This submission is from a q...
1 2 3 4
//creation and affectation myArray= new Array(); myArray[2]='something'; ...
JavaScript Get the last key
by jojolapine,
December 06, 2007 11:42,
10 refactorings
I have to get the last key ...
The script binds itself to ...