Welcome To Snipplr


Everyone's Recent Snippets Tagged javascript



1 ... 6 7 8 9 10 ... 46
Find the date with or without a year and with double or single digit month or day. Easily extendable to other date delimiters and formats.
0 849 posted 12 years ago by pumpkinthehead
This code snippet fetches the very latest minified version of jQuery from Google's CDN. If this is not available, we revert to a locally stored version (current version at time of publish was 1.7.1 - update this to suit going forward).
1 866 posted 12 years ago by Huskie
Esto es por si estamos desarrollando una aplicación en la cual necesitamos manejar la fecha y hora con javascript.
0 609 posted 12 years ago by jrobinsonc
In JavaScript, there are 6 "falsy" values (values that evaluate to false): false, null, undefined, 0, "" (the empty string), and NaN Anything else evaluates to true.
0 434 posted 12 years ago by goo
There are 2 jQuery snippets, both replace broken images with one of your choosing, the difference is that one is "safe" and the other is "persistent". The safe one will quick working, so if your doing something that dynamically changed images on a pa...
3 809 posted 12 years ago by FatFolderDesigner
1 460 posted 12 years ago by otternq
Use CDN if online. Fallback to local version if offline.
0 731 posted 12 years ago by caruso_g
A complete HTML page for a Facebook "app" that does login entirely on the client. 1 - Create a Facebook application (see Facebook developer docs.). 2 - Because of a Facebook "bug" the app should have Sandbox Mode disabled (App Settings - Advanced -...
8 1554 posted 12 years ago by rlmcneary2
When you use the `+` operator on an Array, it converts it to a string.` [].toString()` is the same as `[].join(',')`, which gives an empty string in case the array value is `undefined` or `null`. This also works in Javascript `([undefined] + "b" ===...
0 456 posted 12 years ago by luizlopes
an operator that implements true prototypal Object inheritance in JavaScript
0 599 posted 12 years ago by luizlopes
Default adapter saves to DOM.
0 554 posted 12 years ago by stur
JSLint requires the body of every `for in` statement should be wrapped in an `if` statement
0 688 posted 12 years ago by luizlopes
Show Hide table data uses href, anchors, div tags, and javascript to toggle between showing and hiding a table on the html page.
0 482 posted 12 years ago by richtt
this function gets a parameter like an hex color (es: "#ffffff"), an abbreviated hex color (es: "#fff"), an rgb color (es: "rgb(255,255,255)") or an rgba color (es: "rgba(255,255,255,1)"), and returns an object containing the rgba values, like { red:...
0 1645 posted 12 years ago by claudiowebdesign
wrote this snippet as a necessity to preload many images without writing same code all the time in JS...
0 642 posted 12 years ago by alik
jQuery to set the width of some text to the width of a given element.
0 709 posted 12 years ago by Narthur
Get value from 5 Star Rating
0 2074 posted 12 years ago by neoline
A quick, simple example of using Lawnchair to store and retrieve data for a jQuery Mobile based PhoneGap project. Written by a JavaScript newbie.
0 612 posted 12 years ago by ryanstewart
Highly customizable search widget for Google+ that is inspired by Twitter widgets. This widget searches across the body and comments of public posts and displays a summarized version of matching posts with any attached images.
0 545 posted 12 years ago by mikemore
Usar no console.
0 411 posted 12 years ago by Jotape
Dynamically add <label> HTML tag to input description, matching the input by adding an ID value to the input.
0 638 posted 12 years ago by jbernus
two awesome bits: using ''.replace() perform an action (other than replacing it) on some text, and a simple way to concatenate strings with a separator (retardedly simple but it always confuses me)
0 593 posted 12 years ago by ultranaut
http://stackoverflow.com/questions/3628649/javascript-self-contained-sandbox-events-and-client-side-stack
0 626 posted 12 years ago by ultranaut
1 ... 6 7 8 9 10 ... 46