Welcome To Snipplr
Everyone's Recent Snippets Tagged javascript
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
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...
0
269
posted 8 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
269
posted 8 years ago by o0110o
How to insert the less preprocessor script in WordPress Websites and Blogs
0
264
posted 8 years ago by ecksteing
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
218
posted 8 years ago by o0110o
Emulates the StringBuilder() function found in .NET Languages
0
161
posted 8 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
371
posted 8 years ago by Syllogism
With jQuery and SPServices, we have very powerful tools for accessing and manipulating Sharepoint data and precisiely contolling the presentation, entirely from the client side. But such solutions generally need to be either hard-coded into pages or...
0
405
posted 8 years ago by rumremix
Simple code example that allows you to pull a time stamp / timestamp to attach to end of URL for GET POST calls
0
312
posted 8 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
410
posted 8 years ago by pmw57
Use this snippet in Linux shell to install RVM and set it up for use with Sprockets.
0
235
posted 8 years ago by symsec
Standard hasClass, addClass, and removeClass functions, reworked so that jsLint is happier about them, and fixed the removeClass function so that things are trimmed after removing a class name.
2
359
posted 8 years ago by pmw57
Simulate the $_GET array from php in javascript to get url parameters this way:
url= http://localhost/?var1=example
$_GET['var1'] will return "example"
Just copy and paste the code.
2
341
posted 8 years ago by sergiazow
Comprueba la existencia de una cadena de texto en un input con javascript. (LA impresion del input está en CAKEPHP)
0
195
posted 8 years ago by serialk89
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
353
posted 8 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
682
posted 8 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
231
posted 8 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
193
posted 8 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
189
posted 8 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
162
posted 8 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
195
posted 8 years ago by timsommer