function mark_for_destroy(element,type) {
  $(element).next('.should_destroy').value = 1;
  $(element).up(type).hide();
...

JavaScript On Combining javascript for 2+...

by yaleman, October 18, 2007 08:49 Star_fullStar_fullStar_fullStar_fullStar_full

now you can feed it .phone ...

626b9b038d946d6786dd14861ecfde47 Talk

JavaScript On Beautify JS Date to how rec...

by Andre Steenveld, October 17, 2007 11:38

It's a bitwise operation wh...

D41d8cd98f00b204e9800998ecf8427e Talk

JavaScript On Is this year a leap year?

by Ali Karbassi, October 13, 2007 19:08

Owen:

According the Wikipe...

90dfcf7e54299842383ab503b6df1a65 Talk

JavaScript On Beautify JS Date to how rec...

by richardhealy, October 12, 2007 09:15

Tomasz! Nice little bit of ...

28e65a85a625f7c0689bcf96ccf6043d Talk
//usage: "my sentence: cats, dogs, and fish".capitalize_all() == "My Sentence: Cats, Dogs, And Fish"
String.prototype.capitalize_all = function(){
  return this.replace(/(\w+)/g, function(word){
...

JavaScript On ucfirst

by Emmett, October 09, 2007 15:51 Star_fullStar_fullStar_fullStar_fullStar_full

travis: Now that's what I c...

D41d8cd98f00b204e9800998ecf8427e Talk
#someSelector
...

JavaScript On ucfirst

by travis, October 09, 2007 14:51 Star_fullStar_fullStar_full

There is a way to do this w...

918aabb05e77cfa8e40d2a76a5168326 Talk
String.prototype.ucFirst = function(){
  var words = this.split(" ");
  
...

JavaScript On ucfirst

by Andre Steenveld, October 09, 2007 12:09

Just a little fix

7ab05ae02bbc7401f852d586bba1afc2 Talk
String.prototype.ucFirst = function(){
  var words = this.split(" ");
  
...

JavaScript On ucfirst

by Andre Steenveld, October 09, 2007 11:59

txen; your soloution is qui...

7ab05ae02bbc7401f852d586bba1afc2 Talk
String.prototype.ucfirst = function()
{
  var text;
...

JavaScript On ucfirst

by txen, October 09, 2007 09:48

ups, sorry. I think you wan...

3623af0337de1b64ced5742cc221d03a Talk
String.prototype.ucfirst = function()
{
	return this.substring(0,1).toUpperCase()+this.substring(1);
...

JavaScript On ucfirst

by txen, October 09, 2007 08:47 Star_fullStar_full

I think this is a cleaner c...

3623af0337de1b64ced5742cc221d03a Talk
function check(formName) {
	var labels = formName.form.getElementsByTagName('label');

...

JavaScript On Simple Form Validation

by Spencer Sutton, October 07, 2007 23:22

A very simple solution for ...

1698d15fc1bd38ce0def885375c2bec2 Talk
var Aux = {
	multiformatEditor : function(target, value, onExit) {
		function switchToHTML() {
...

JavaScript On AJAX rich text widget

by Spencer Sutton, October 07, 2007 22:32

Here is my best try, I have...

1698d15fc1bd38ce0def885375c2bec2 Talk
Object.extend(Date.prototype, {
  isLeap: function(){
    return !(this.getFullYear() % 4);
...

JavaScript On Is this year a leap year?

by Owen, October 07, 2007 19:07 Star_full

Since all leap years are mu...

D14b68d8b26a558f5acea3ceccf9c78c Talk

JavaScript On Tracking File Downloads Aut...

by Bosko, October 04, 2007 20:38

he does that because google...

Dce90ceb553a872aa5c621c363c5ff57 Talk

JavaScript On Tracking File Downloads Aut...

by macournoyer, October 04, 2007 19:07

Nice script deleteme (wtf's...

Bfec5f7d1a4aaafc5a2451be8c42d26a Talk

JavaScript On Simple Form Validation

by Ali Karbassi, October 04, 2007 08:27

Travis: I love jQuery and a...

90dfcf7e54299842383ab503b6df1a65 Talk

JavaScript On Simple Form Validation

by travis, October 04, 2007 07:09

oops, the button should be ...

918aabb05e77cfa8e40d2a76a5168326 Talk
$(function() {
	$("#formID").bind("submit", function() {
...

JavaScript On Simple Form Validation

by travis, October 04, 2007 07:06

You could really reduce you...

918aabb05e77cfa8e40d2a76a5168326 Talk
function check( formName ) {
  var err = [];
...

JavaScript On Simple Form Validation

by Sean Catchpole, October 03, 2007 16:40

While I'm sure there are ot...

B9c4fc6020513ae8896e075f54616af2 Talk

JavaScript On Simple Form Validation

by Squeegie, October 03, 2007 09:15

if you want that button to ...

D41d8cd98f00b204e9800998ecf8427e Talk
Date.prototype.when = function(){
	var diff = (new Date() - this)/1e3,
	u = [ "second", "minute", "hour", "day", "weeks", "month", "year" ],
...

JavaScript On Beautify JS Date to how rec...

by Tomasz `neo` Kołodziejski, October 03, 2007 06:20 Star_fullStar_fullStar_fullStar_full

I think that using the getT...

D41d8cd98f00b204e9800998ecf8427e Talk

JavaScript On Simple Form Validation

by Andre Steenveld, October 03, 2007 00:35

What is your question exact...

D41d8cd98f00b204e9800998ecf8427e Talk
Object.extend(Date.prototype, {
	isLeap: function()
	{
...

JavaScript On Is this year a leap year?

by Ali Karbassi, October 02, 2007 19:03

Going of what "br" said and...

90dfcf7e54299842383ab503b6df1a65 Talk
Date.prototype.when = function(){
	var diff = ( ( new Date(0) ).getTime() - this.getTime() ) / 1000,
		units = [ "60|second", "60|minute", "24|hour", "7|day", "4.333|week", "12|month", "1|year" ];
...

JavaScript On Beautify JS Date to how rec...

by Andre Steenveld, October 02, 2007 16:06

Any short than this would b...

7ab05ae02bbc7401f852d586bba1afc2 Talk
Date.prototype.when = function(){
    var diff = ( ( new Date(0) ).getTime() - this.getTime() ) / 1000,
        units = [ "second", "minute", "hour", "day", "weeks", "month", "year" ],
...

JavaScript On Beautify JS Date to how rec...

by Andre Steenveld, October 02, 2007 14:02

I was very very impressed b...

7ab05ae02bbc7401f852d586bba1afc2 Talk