Welcome To Snipplr
Everyone's Recent Snippets Tagged javascript
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
The marquee will stop when you hover the cursor over it. It will restart when you move the cursor away from it.
1
890
posted 12 years ago by o0110o
How to insert the less preprocessor script in WordPress Websites and Blogs
0
851
posted 12 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
915
posted 12 years ago by o0110o
Emulates the StringBuilder() function found in .NET Languages
0
615
posted 12 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
1256
posted 12 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
1458
posted 12 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
1077
posted 12 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
1220
posted 12 years ago by pmw57
Use this snippet in Linux shell to install RVM and set it up for use with Sprockets.
0
826
posted 12 years ago by symsec
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
1347
posted 12 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
1122
posted 12 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
744
posted 12 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
1135
posted 12 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
2778
posted 12 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
882
posted 12 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
719
posted 12 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
712
posted 12 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
631
posted 12 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
713
posted 12 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
724
posted 12 years ago by timsommer