Welcome To Snipplr


Everyone's Recent jQuery Snippets



« Prev 1 2 3 4 5 ... 30
Hide parent element, when child element has a specific class. In this case: child element = .no-news-found parent element = .csc-default (= content element containing the news plugin with header)
0 1030 posted 6 years ago by xtine777
Here’s a super handy snippet that I use very often. It works very simply: once the user clicks on #submit, the data from #form is serialized and sent to a remote page using the POST method.
0 1990 posted 7 years ago by catswhocode
Switch between text on button every second
0 944 posted 8 years ago by envane21
Counter from 0 to number
0 961 posted 8 years ago by envane21
Loop between images on hover
0 1060 posted 8 years ago by envane21
Endless loop between 3 images
0 966 posted 8 years ago by envane21
change <span> value of button with jquery
0 1038 posted 9 years ago by envane21
IIFE - Immediately Invoked Function Expression. http://gregfranko.com/jquery-best-practices/#/7 http://gregfranko.com/jquery-best-practices/#/8
0 966 posted 9 years ago by Waltem
JQUERY READY EVENT BEST PRACTICE
0 859 posted 9 years ago by SmellWing
The basic structure of making a page responsive
0 1072 posted 9 years ago by envane21
A simple left-right animation
0 862 posted 9 years ago by envane21
Add class .green to class .payment-container and make it flash every 3 seconds
0 932 posted 9 years ago by envane21
Submit function for Foundation framework
0 849 posted 9 years ago by envane21
Used to automatically scroll up the page so that it is focused on user entry (mobile devices)
0 866 posted 9 years ago by envane21
First you need to write your script. In your theme folder create a folder called something like 'js'. Create a file in that folder for your javascript. E.g. your-script.js. Add your jQuery script to that file (you don't need <script> tags in a .js fi...
0 1482 posted 9 years ago by designermedia
durr
0 1056 posted 9 years ago by olesla
This is a simple way to make custom checkboxes in jQuery.
0 935 posted 9 years ago by del4y
Useful when using a template or Wordpress and the LeadPages code is called on every page and there is a single page you don't want the fancy exit marketing signup form to appear. The LeadBox external code has a boolean variable called 'safetyCheck...
0 902 posted 9 years ago by mountainash
To check if an “enter” key is pressed inside a textbox, just bind the keypress() to the textbox.
0 1247 posted 9 years ago by luhonghai
To detect copy, paste and cut behavior, you just need to bind the corresponding event type.
0 1644 posted 9 years ago by luhonghai
To check if jQuery library is loaded, use the following JavaScript code
0 1125 posted 9 years ago by luhonghai
JQuery is really a powerful and handy JavaScript library. The page or content loading effect is very easy to implement in jQuery. Here’s a example to make your web page content display a fade in page loading effect
0 1036 posted 9 years ago by luhonghai
Bei dieser Variante lassen sich die Checkboxen nur einmal aktivieren/deaktivieren. Bei weiteren Versuchen wird zwar im Quelltext altiviert/deaktiviert, es ist aber auf der Seite nicht zu sehen.
0 957 posted 9 years ago by ulfinger
The purpose of this hook method is to help provide a separation of concerns between CSS and JavaScript. Typically class names are used to attach JavaScript to HTML elements. Using a separate data-hook attribute helps to protect the scripting from...
0 957 posted 9 years ago by pmw57
Mit dem php-Script innerhalb der Seite wird aus der SQL-Datenbank ein Javascript-Array zusammengestellt. Darauf greift das autocomplete-Widget zu.
0 1059 posted 10 years ago by ulfinger
Vérifie si une checkbox a été cochée
0 1182 posted 10 years ago by Igeco
Please visit http://pantuts.com/2014/09/21/quicknote-jquery-plugin/ for other included files and demos. Thanks
0 1024 posted 10 years ago by pantuts
Méthode n'autorisant que les nombres (positifs/négatifs/décimaux avec virgules ou points) dans un champ
0 1044 posted 10 years ago by Igeco
N'autorise que les chiffres (avec , ou . ou négatifs) dans un input
0 977 posted 10 years ago by sebabarre
The code is meant to find out electrical dc power using formulas p=vi, P=v<sup>2</sup>/R, and P=i<sup>2</sup>*R.
0 888 posted 10 years ago by KhanOf21Century
« Prev 1 2 3 4 5 ... 30