1
2
3
4
/**
 * http://www.openjs.com/scripts/events/keyboard_shortcuts/
 * Version : 2.01.B
...

JavaScript On Handling Keyboard Shortcuts...

by Tien Dung, August 06, 2008 07:22

My final attempt :)

5071c5b861341c0dcfcf6ac86327701f Talk
1
return Math.floor(x/60) + ":" + (x%60<10?"0":"")+x%60;

JavaScript On countdown timer (minutes &a...

by AnonymousBot, August 01, 2008 20:45

Sorry, one slight correctio...

C510febb9bed68b5cc4a09f076701e0f Talk
1
return Math.floor(x/60) + ":" + (x<10?"0":"")+x%60;

JavaScript On countdown timer (minutes &a...

by AnonymousBot, August 01, 2008 20:22

Change line 12 to read:

C510febb9bed68b5cc4a09f076701e0f Talk

JavaScript On countdown timer (minutes &a...

by Tien Dung, July 28, 2008 23:43

Hi Steve, just change to fu...

5071c5b861341c0dcfcf6ac86327701f Talk

JavaScript On countdown timer (minutes &a...

by steve, July 28, 2008 12:39

guys - awesome script. gre...

4592f7edcb3d4acb437774c4e2d784c1 Talk
1
2
3
4
var odump = (function(){
  var max, INDENT = "                                   "; // As long as you need :)
  
...

JavaScript On Recursively dump an object

by Tien Dung, July 25, 2008 10:00

More JavaScript magic and e...

5071c5b861341c0dcfcf6ac86327701f Talk
1
2
3
4
function thousands(num, decpoint, sep) {
  decpoint = decpoint || ".";
  sep = sep || ",";
...

JavaScript On Thousands

by Tien Dung, July 25, 2008 09:03 Star_fullStar_fullStar_fullStar_fullStar_full

No RegExp refactor :)

5071c5b861341c0dcfcf6ac86327701f Talk

JavaScript On countdown timer (minutes &a...

by Jermaine, July 24, 2008 06:50

Guys, this helped me alot. ...

79b4825afe5c22c7d6226037ac81ee69 Talk
1
2
3
4
<html>
<body>
<div id="countdown"></div>
...

JavaScript On countdown timer (minutes &a...

by Tien Dung, July 24, 2008 01:12 Star_fullStar_fullStar_fullStar_full

Compact version

5071c5b861341c0dcfcf6ac86327701f Talk
1
2
3
4
<html>
<body>
<div id="countdown"></div>
...

JavaScript On countdown timer (minutes &a...

by Tien Dung, July 24, 2008 01:03

Here is my refactor code. M...

5071c5b861341c0dcfcf6ac86327701f Talk
1
2
3
this.getHttpRequest(identifier).onreadystatechange = function() {
	ajaxChat.handleResponse(identifier);
};

JavaScript On AJAX makeRequest

by GateKiller, July 23, 2008 08:35

Does it work if you remove ...

98c852e2d9b26249745ea92c72964d3f Talk
1
2
3
4
function numberToCurrency(number, format) {
  var match, defaultFormat, property, integerPart, fractionalPart;
	
...

JavaScript On Rails-like number_to_curren...

by Tien Dung, July 23, 2008 04:24

Oops! I forgot precision = ...

5071c5b861341c0dcfcf6ac86327701f Talk
1
2
3
4
function numberToCurrency(number, format) {
  var match, defaultFormat, property, integerPart, fractionalPart;
...

JavaScript On Rails-like number_to_curren...

by Tien Dung, July 23, 2008 04:12

I combine two function in o...

5071c5b861341c0dcfcf6ac86327701f Talk

JavaScript On Rails-like number_to_curren...

by Barry Hess, July 17, 2008 14:39

This is JavaScript - I don'...

0218fde3a78fadbadb566bdb40d7b0dd Talk

JavaScript On Rails-like number_to_curren...

by pink, July 17, 2008 13:43

hi, how do you use this? I ...

C97ded8e1c6497f79b43a3413edf77e8 Talk
1
2
3
4
$.fn.textNodes = function() {
  var ret = [];
  $.each(this[0].childNodes, function() {
...

JavaScript On [jQuery] All descendent tex...

by jed, July 08, 2008 16:27

@jp.stacey

Good catch. I d...

7b72d5a18ab92129692e97a76a153fe0 Talk
1
2
3
4
TDisplay = new _TDisplay();
TDisplay.tick = function() {
	TDisplay._tick.call(TDisplay);
...

JavaScript On countdown timer (minutes &a...

by Ryan Cooke, July 03, 2008 04:10

@Chris: I used my prototypi...

5997d626098b88721c9393c68f633fc1 Talk
1
2
3
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
...

JavaScript On Markdown-like editor

by Zodoz, July 03, 2008 01:47

Oh yea, and here is my test...

2bf2366ae73ca0d6974cad4575a16472 Talk
1
2
3
$.fn.textNodes = function() {
   return this.find(*).filter(function(index) { return (this.nodeType==3)||(this.nodeName="br")}).andSelf();
}

JavaScript On [jQuery] All descendent tex...

by Eineki, June 30, 2008 10:43 Star_full

Let me say that I'm rather ...

5a00a3a98dcf6f9cd717440fd2b606e5 Talk
1
2
3
4
function _TDisplay() {
    var self = this;
    this.tick = function () {
...

JavaScript On countdown timer (minutes &a...

by Chris Jester-Young, June 29, 2008 22:23

@Ryan: Yes, it seems backwa...

729442eea8d8548842a6e0947e333c7b Talk
1
2
3
4
<div id="countdown"></div>
<div id="notifier"></div>

...

JavaScript On countdown timer (minutes &a...

by Ryan Cooke, June 29, 2008 21:32 Star_fullStar_fullStar_fullStar_full

Here's an OO implementation...

Ee6004d792f0e95649571bfe483daf65 Talk
1
2
3
4
$.fn.textNodes = function() {
  var ret = [];
  this.contents().each( function() {
...

JavaScript On [jQuery] All descendent tex...

by jp.stacey, June 29, 2008 21:32 Star_fullStar_fullStar_fullStar_fullStar_full

From what you say, you only...

Ee251c8e33a6ee0920d6bf43c5d0f541 Talk
1
2
3
4
<div id="countdown"></div>
<div id="notifier"></div>

...

JavaScript On countdown timer (minutes &a...

by Glen Solsberry, June 27, 2008 21:06

What about the following?

9d8de42cebeeaf6d223d86bb9130832b Talk
1
http://bassistance.de/jquery-plugins/jquery-plugin-validation/

JavaScript On Simple Form Validation

by Tj Holowaychuk, June 09, 2008 21:08

This will REALLY cut down y...

F1e3ab214a976a39cfd713bc93deb10f Talk
1
2
3
4
Date.prototype.getFormatedWeek = function( ){ 
    var months = [
        "January", "February", "March", "April", "May", "June", 
...

JavaScript On Week Of Date

by Andre Steenveld, May 25, 2008 19:48

At the cost of creating 2 e...

Avatar Talk