Welcome To Snipplr


Everyone's Recent JavaScript Snippets



1 ... 57 58 59 60 61 ... 67
This method allows you to call a function as a method of another object. The first argument the call method expects is the object it is to operate on. Any others are part of the function. Note how the this keyword now refers to the comp object, so a...
0 325 posted 14 years ago by 1man
The important thing to notice is the () operator in a[2]. It is invoking the function inside a[0] with the argument a[1].
1 381 posted 14 years ago by 1man
Every function has an object called the arguments object. This is an object that contains all the arguments that were passed to the function. The example below shows how to access these. Very rarely used but useful to know. Note: it may look like an...
2 391 posted 14 years ago by 1man
Simple way of allowing functions to take optional arguments. Always place the optional arguments last, so you don't have to explicitly pass an argument as "undefined".
3 347 posted 14 years ago by 1man
Getting SuperSleight running on a page is quite straightforward, you just need to link the supplied JavaScript file into your document inside conditional comments so that it is delivered to only Internet Explorer 6 or older.
3 503 posted 14 years ago by jonhenshaw
Just call the function in an HTML element and it would flip the text in it.
1 360 posted 14 years ago by iTony
libreria que mediante ajax y javascript permite paginar los contenidos de una tabla
0 279 posted 14 years ago by victorchamorro
var lib = ['foo.js','foo.js','foo2.js','foo.js','foo333.js','foo2.js']; var slib = 'fooooo.js'; lib.jitScript(); // append foo.js, foo2.js & foo33.js slib.jitScript(); // append fooooo.js enable firebug console JitScriptDebug = true; val...
0 355 posted 14 years ago by ChaosKaizer
using bgiframe to solve a bug in explorer: you cannot apply z-index to place divs over selects in a form!!!
1 426 posted 14 years ago by victorchamorro
Basic usage of the in and instanceOf operators.
0 366 posted 14 years ago by 1man
3 381 posted 14 years ago by miziomon
This was created as a temporary solution to the wide dropdowns that sometimes appear in OpenAir timesheets and cause horizontal scrolling. Adding this script as a bookmarklet and clicking it will resize all selects (dropdowns) on a page to 340px wide...
0 285 posted 14 years ago by Todd
SEE http://json.org/ for PHP JSON Libraries. grunt knuckle drag brute force ugly escapes for quotes make a php array a json string Produces trailing commas which some Javascript Librarys can't deal with.* _*NOOB NOTE [a comma is added at the...
2 524 posted 14 years ago by inkdeep
This routine is loosely based on elightbo's "Calculate Business Days" snippet in ASP, with some process & logic modifications (most notably accounting for situations when both dates fall on a weekend) and a translation to JavaScript.
0 1948 posted 14 years ago by Bluebeard
A simple code for changing currencies using Google:)
2 330 posted 14 years ago by misnyo
Very simple drag and resize function.
1 408 posted 14 years ago by 1man
Very basic way to toggle an element to slide in and out using mootools 1.1. Uses FX.Slide, other transitions are available.
2 387 posted 14 years ago by 1man
With decimal separator "."
2 488 posted 14 years ago by arcturus
The setTimeout ensures that if there is an issue attaching the link to the bottom of the head (e.g. if the head hasn’t finished loading when the link is trying to be attached) it retries after 100ms. Resetting the css variable to null avoids potent...
1 542 posted 14 years ago by natalie
JS Fix for IE6 background image flickering on mouseover's
2 400 posted 14 years ago by brentg
1 ... 57 58 59 60 61 ... 67