Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged javascript



based on the NappScrollViewExtended module (it is good but couse my app some problem)
0 640 posted 11 years ago by boardmain
Returns the differencia in days between tw dates
0 810 posted 11 years ago by agarcim
Functions to add, get y remove CSS rules
0 655 posted 11 years ago by agarcim
Con este esquema puedes crear objetos instanciables en Javascript usando jQuery. Su uso es muy simple, sólo debes copiar el siguiente código y cambiar las variables que están en mayúsculas.
0 597 posted 11 years ago by porquero
This is a more precise version of the native setTimeout(). It uses the same parameters as setTimeout, but adds a third parameter "resolution" which defines how often (in ms) to check for the time that passed. // alert after 5 seconds with an i...
2 527 posted 11 years ago by McSodbrenner
Con ese codigo pueden agregar tildes y ñ en los alert o en las funciones de facebook
0 611 posted 11 years ago by serialk89
Sometimes you have some information on your page and your visitors might want to copy it. The easiest way is to provide a mechanism that allows them to simply click a button to do so. You have to paste this code into the head of your web page:
0 773 posted 11 years ago by apphp-snippets
This script informs your visitor that a given page may be reached only from the page that you specify. Paste this code before the ending <head> tag on the page:
0 728 posted 11 years ago by apphp-snippets
This will reset the tabindex of all input fields on a form after page load
0 1067 posted 11 years ago by bitsculptor
removes scrollbars and expand to content height.
0 594 posted 11 years ago by bonalepo
Code snippets from the x-editable source code
0 705 posted 11 years ago by steho
The following function loads all browser-cookies into an associative array with the cookie name as the index and the cookie value as the value
0 566 posted 11 years ago by satie83
Javascript which converts a Date object into an ISO 8601 formatted string - 'YYYY-MM-DDTHH:mm:ss.sssZ' - with a fallback for when the function 'toISOString' doesn't exist (e.g. IE 8 or less). Usage: var now = new Date; console.log(now.toISOStrin...
0 1295 posted 11 years ago by davidwaterston
Browser detection before sending any resources to the client.
0 927 posted 11 years ago by chrisaiv
This is a very basic wrapper for querySelectorAll. Just add prototypes and whatever else you need.
1 637 posted 11 years ago by o0110o
With this statement you can reload a page, this will also reset any forms on the page.
1 538 posted 11 years ago by seloh77
A simple template for a JavaScript function which allows for an arbitrary number of named arguments to be passed in. This is achieved by passing a single object as an argument with each of the 'real' arguments being a key/value pair. In this way argu...
0 1118 posted 11 years ago by davidwaterston
Basic information on JavaScript from CodeAcademy.com's JavaScript track
0 615 posted 11 years ago by denakitan
JavaScript is the only option, if you want to have the ability to clear all form fields. Yes, HTML form has Reset method, but if the form has initial values, then Reset will return the form to the initial state instead of clear input fields. This exa...
1 745 posted 11 years ago by laxman2021
The marquee will stop when you hover the cursor over it. It will restart when you move the cursor away from it.
1 711 posted 11 years ago by o0110o
generischer Handler für die Eventausgabe in der Konsole....
0 747 posted 11 years ago by dejot
jsHint happy class template for javascript
1 762 posted 11 years ago by XtreamIT
Set the desired date within the function. Make some images and label them "1.jpg, 2.jpg, 3.jpg, etc...". That's how it's done.
1 716 posted 11 years ago by o0110o
javascript arrays up and down
2 594 posted 11 years ago by kutyadog
Emulates the StringBuilder() function found in .NET Languages
0 473 posted 11 years ago by jswaringen
this is how to instantiate a dropdown shadow using js code, works in IE10 and windows store apps. Important for when you want use templates.
0 1041 posted 11 years ago by Syllogism
Obtener el último video favorito de un usuario de youtube
0 474 posted 11 years ago by alexdw
Simple code example that allows you to pull a time stamp / timestamp to attach to end of URL for GET POST calls
0 861 posted 11 years ago by kutyadog
Code from https://snipt.net/geekyjohn/get-url-param/ updated so that most jslint issues are resolved, and updated the return to use a guard condition instead of a separate if statement.
1 1009 posted 11 years ago by pmw57
Standard hasClass, addClass, and removeClass functions. - reworked so that jsLint is happy about them - removeClass function trims things after removing a class name - tests help to ensure that all common use-cases are covered
2 1045 posted 11 years ago by pmw57