function PrintHour(hour) {
var o = hour + 5;
return ((o%12) + 1) + ":00" + (((o%23) - 10) > 0 ? "P" : "A") + "M";
...
function PrintHour(hour) {
var o = hour + 5;
return ((o%12) + 1) + ":00" + (((o%23) - 10) > 0 ? "P" : "A") + "M";
...
JavaScript On Writing a loop to create a ...
by Garren,
December 24, 2008 00:40
oops BusinessHour should be...
function PrintHour(hour) {
var o = hour + 5;
return ((o%12) + 1) + ":00" + (((o%23) - 10) > 0 ? "P" : "A") + "M";
...
JavaScript On ImageFlow - something like ...
by Stephen,
December 23, 2008 20:02
Do you think it would be po...
function countdown(remain,messages) {
var
notifier = document.getElementById("notifier"),
...
JavaScript On countdown timer (minutes &a...
by some,
November 17, 2008 11:06
I like Tien Dungs approach ...
x = new Array(); x[2] = 'something'; x[7] = 'somethingelse'; ...
JavaScript On Get the last key
by SEO Services,
November 08, 2008 01:42
Another thing you can do to...
JavaScript On Highlight Selected forms, S...
by openid.aol.com/forwardfootmedia,
October 14, 2008 19:39
I like the naming of formDe...
FormDefault = {
setHighlight: function(object) {
var element = FormDefault.element(object);
...
JavaScript On Highlight Selected forms, S...
by Adam,
October 14, 2008 19:12
Prototype version based on ...
JavaScript On Highlight Selected forms, S...
by John Sietsma,
October 12, 2008 03:09
No really, I suppose just b...
JavaScript On Highlight Selected forms, S...
by openid.aol.com/forwardfootmedia,
October 11, 2008 20:41
29 lines over 90, Not bad. ...
$.fn.setHighlight = function() {
return this.each( function() {
$(this).removeClass('optional');
...
JavaScript On Highlight Selected forms, S...
by John Sietsma,
October 11, 2008 04:51
I couldn't resist a JQuery ...
function getAnchor(default) {
default = default || 'news';
return document.location.toString().split( '#' )[1] || default;
...
JavaScript On Small Javascript Code
by Tien Dung,
October 06, 2008 22:23
You can't do ||= in JavaScript
Q("#toggler").click(function() {
var mode = this.mode;
this.mode = !mode;
...
JavaScript On Toggle "Check all / Un...
by Tien Dung,
October 06, 2008 22:19
Use true/false instead of u...
var getAnchor = function (default) {
default ||= 'news';
return document.location.toString().split( '#' )[1] || default;
...
JavaScript On Small Javascript Code
by chovy.myopenid.com,
October 06, 2008 19:46
Some would say you should o...
var selectedAnchorOr = function(url, default) {
var urlWithAnchor = url.match(/^.*(#.+)$/);
if (urlWithAnchor !== null) {
...
JavaScript On Small Javascript Code
by Gabriele Lana,
October 06, 2008 06:13
Not tested but should work....
// Don't know why you need hash > 0 and page.length > 1
// In case you don't need those conditions
var page = document.location.toString().split("#")[1];
...
/* var biz; ...
JavaScript On Small Javascript Code
by chovy.myopenid.com,
October 06, 2008 02:05
Get position of "#" in the ...
var State = {
validations: $H({
"Unknown": function(index, value) { !boil[index] || !melt[index] },
...
JavaScript On Color elements by state of ...
by Adam,
September 18, 2008 04:47
Using Prototype and taking ...
function state_classes(updateall) {
var value = display.value * 1, tempcolor;
var element, state,
...
JavaScript On Color elements by state of ...
by Tien Dung,
September 16, 2008 06:44
or using eval(..)
function state_classes(updateall) {
var value = display.value * 1, tempcolor;
var element, state, states = ["Unknown", "Gas", "Liquid", "Solid"];
...
Date.MONTH_NAMES = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; ...
JavaScript On Week Of Date
by Andrew Dupont,
September 04, 2008 15:47
Right, OK. Tweaked again so...

@some - real nice solution....