Welcome To Snipplr


Everyone's Recent JavaScript Snippets



1 ... 5 6 7 8 9 ... 66
Load jQuery and tell every div to be 100% width
0 1049 posted 10 years ago by cmndo
Another popup jQuery plugin implementation complying with YAGNI.
0 525 posted 10 years ago by p-baleine
This send any value via POST to a PHP page. It is done with AJAX, so the POST return can be used on the same page as the submit
0 675 posted 10 years ago by rickygri
This javascript function takes the URL of the target page and an associative array of name/values paires and POSTs the data to the supplied URL by dynamically creating a form and then submitting it.
0 1706 posted 10 years ago by rickygri
The following javascript allows your to embed a video as a overlay on any HTML page. The script needs to be added in the head or external file, and the div tag needs to be placed on the page where you want the video image to show up. Another optio...
0 470 posted 10 years ago by ptlrikin
In this section we're going to explore the decorator - a structural design pattern that promotes code reuse and is a flexible alternative to subclassing. This pattern is also useful for modifying existing systems where you may wish to add additional...
0 397 posted 10 years ago by timsommer
The Factory Pattern suggests defining an interface for creating an object where you allow the subclasses to decide which class to instantiate. This pattern handles the problem by defining a completely separate method for the creation of objects and w...
2 388 posted 10 years ago by timsommer
When we put up a facade, we present an outward appearance to the world which may conceal a very different reality. This was the inspiration for the name behind the facade pattern. The facade pattern provides a convenient higher-level interface to a l...
0 335 posted 10 years ago by timsommer
The Command pattern aims to encapsulate method invocation, requests or operations into a single object and gives you the ability to both parameterize and pass method calls around that can be executed at your discretion. In addition, it enables you...
0 402 posted 10 years ago by timsommer
In software engineering, a mediator is a behavioral design pattern that allows us to expose a unified interface through which the different parts of a system may communicate. If it appears a system may have too many direct relationships between modu...
0 384 posted 10 years ago by timsommer
The module pattern was originally defined as a way to provide both private and public encapsulation for classes in conventional software engineering. In JavaScript, the module pattern is used to further emulate the concept of classes in such a way t...
0 377 posted 10 years ago by timsommer
In object literal notation, an object is described as a set of comma-separated name/ value pairs enclosed in curly braces ({}). Names inside the object may be either strings or identifiers that are followed by a colon. There should be no comma used...
0 309 posted 10 years ago by timsommer
In conventional software engineering, the singleton pattern can be implemented by creating a class with a method that creates a new instance of the class if one doesn't In conventional software engineering, the singleton pattern can be implemented b...
1 425 posted 10 years ago by timsommer
In conventional software engineering, the singleton pattern can be implemented by creating a class with a method that creates a new instance of the class if one doesn't exist. In the event of an instance already existing, it simply returns a referen...
1 501 posted 10 years ago by timsommer
Easy-to-use leaderboard
0 421 posted 10 years ago by chrisaiv
format numbers in javascript with group digits
0 757 posted 10 years ago by rg443
wild scope on genuineBottom...
1 370 posted 10 years ago by tnntwister
išorinio javascript failo įtraukimas į html
0 309 posted 10 years ago by ptomas
Calculates the amount of time since the date specified with yr, mon, and day. The parameter "countunit" can be "years", "months", or "days" and is the duration between the specified day and today in the selected denomination. The "decimals" parameter...
0 486 posted 10 years ago by StevenW721
In javascript there is no function for printing variables like you have PHP, I use print_r and var_dump a lot in PHP for dumping variables so I wanted to create a simular function in javascript.
0 621 posted 10 years ago by satie83
There are many ways to deliver a crossdomain.xml file through NodeJS or Express.js. Here is one solution
0 788 posted 10 years ago by chrisaiv
How to retrieve entity StateCode (Status) in JavaScript by accessing CRM oDATA (REST) Service
0 696 posted 10 years ago by toLL
How to launch custom dialog from JavaScript (for example from custom RibbonButton)
0 407 posted 10 years ago by toLL
Remove the item from the array changing the length of the array.
0 577 posted 10 years ago by agarcim
Write a given number in words - Escreve um número por extenso. Write in Brazilian Portuguese, sorry for english or other language guys but it can be adapted. Write from 1 to 9999 Based on a forum in http://scriptbrasil.com.br/forum/index.php?...
0 767 posted 10 years ago by glauberportella
Allows the ability to fill City and State fields in CRM 2011 based on the value of a Zip Code field (and optionally Country). Requires JQuery and JSON Uses Yahoo geocode service Originally written by Bill Caldwell ( http://dynamicscrmdenver...
1 572 posted 10 years ago by evshell18
Although I realize one should be able to filter a store to remove unwanted items in the list, this allows the list items through and just hides them via CSS.
0 523 posted 10 years ago by Winkyboy
Formats a 10-digit phone number into a good format (123) 555-1234
0 896 posted 10 years ago by cpres
The closest to a generic List in javascript. When calling constructor - new List(Module) - add model in constructor parameter
0 452 posted 10 years ago by mikkeldamm
1 ... 5 6 7 8 9 ... 66