Welcome To Snipplr
Everyone's Recent jQuery Snippets Tagged javascript
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
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
756
posted 6 years ago by xtine777
To check if an “enter†key is pressed inside a textbox, just bind the keypress() to the textbox.
0
973
posted 9 years ago by luhonghai
To detect copy, paste and cut behavior, you just need to bind the corresponding event type.
0
1319
posted 9 years ago by luhonghai
To check if jQuery library is loaded, use the following JavaScript code
0
878
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
769
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
718
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
718
posted 9 years ago by pmw57
Méthode n'autorisant que les nombres (positifs/négatifs/décimaux avec virgules ou points) dans un champ
0
779
posted 9 years ago by Igeco
N'autorise que les chiffres (avec , ou . ou négatifs) dans un input
0
705
posted 9 years ago by sebabarre
/* author : MD. MUZAHIDUL ISLAM ([email protected])
* file name : cascade-load.js
* This segment of code uses jQuery(jquery-1.7.2.js) that helps to load cascade data from sever.
* To use this code, 'div' element should contains a 'select' h...
0
881
posted 10 years ago by muzahidict
Avoid history back when is pressed backspace key in number imput
0
547
posted 10 years ago by porquero
Checks if JQuery is loaded and then checks if loaded version of JQuery >= needed version
0
494
posted 10 years ago by lubosfonio
myEls should be the selector statement for whatever elements you want to effect. The example wraps every 3.
1
967
posted 11 years ago by adambundy
Here’s a very simple script which adds numbers sequentially to an unordered list using jQuery
0
654
posted 11 years ago by satie83
Another approach that helps saving the overhead calls of the scroll event and the subsequent code.
0
637
posted 11 years ago by Narayon
This code snippet fetches the very latest minified version of jQuery from Google's CDN. If this is not available, we revert to a locally stored version (current version at time of publish was 1.7.1 - update this to suit going forward).
1
841
posted 12 years ago by Huskie
There are 2 jQuery snippets, both replace broken images with one of your choosing, the difference is that one is "safe" and the other is "persistent". The safe one will quick working, so if your doing something that dynamically changed images on a pa...
3
788
posted 12 years ago by FatFolderDesigner
jQuery to set the width of some text to the width of a given element.
0
688
posted 12 years ago by Narthur
Dynamically add <label> HTML tag to input description, matching the input by adding an ID value to the input.
0
620
posted 12 years ago by jbernus
Hi everyone, a while ago i posted a little script that reproduced a little animation effect seen in Windows 8 Developer Preview. I thought about expanding it some more, and in the end i started actually recreating the whole Metro interface in HTML5/C...
1
1231
posted 12 years ago by claudiowebdesign