Welcome To Snipplr
Everyone's Recent jQuery Snippets Tagged jquery
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
IIFE - Immediately Invoked Function Expression.
http://gregfranko.com/jquery-best-practices/#/7
http://gregfranko.com/jquery-best-practices/#/8
0
759
posted 8 years ago by Waltem
To check if an “enter†key is pressed inside a textbox, just bind the keypress() to the textbox.
0
1016
posted 9 years ago by luhonghai
To detect copy, paste and cut behavior, you just need to bind the corresponding event type.
0
1372
posted 9 years ago by luhonghai
To check if jQuery library is loaded, use the following JavaScript code
0
914
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
808
posted 9 years ago by luhonghai
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
753
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
856
posted 9 years ago by ulfinger
Please visit http://pantuts.com/2014/09/21/quicknote-jquery-plugin/ for other included files and demos. Thanks
0
815
posted 9 years ago by pantuts
Méthode n'autorisant que les nombres (positifs/négatifs/décimaux avec virgules ou points) dans un champ
0
830
posted 9 years ago by Igeco
N'autorise que les chiffres (avec , ou . ou négatifs) dans un input
0
744
posted 9 years ago by sebabarre
As you can see you need to add backslash and apostrophe => \' to font family with space between. If there isn't spaces in font name just use double apostrophes, e.g. "Lucida Grande"
0
661
posted 9 years ago by buda9
/* 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
950
posted 10 years ago by muzahidict
A quick demonstration of fading an element in over a set time by starting opacity at 0 and incrementing it + .1 over time.
0
695
posted 10 years ago by winthropite
You can run this in firebug to get yourself an up to date select with all the Industries listed on this page.
http://developer.linkedin.com/documents/industry-codes
0
429
posted 10 years ago by hcker2000
$(document).ready(function() {
var maxHeight = -1;
$('.features').each(function() {
maxHeight = maxHeight > $(this).height() ? maxHeight : $(this).height();
});
$('.features').each(function() {
$(this).height(maxHeight...
1
706
posted 10 years ago by thesmu
A little snippet that I use to hide or show text using jquery
1
724
posted 10 years ago by TwistedEinstein
Simple function to include in your script to enable multi-line text-overflow.
See the jsfiddle (http://jsfiddle.net/eAyyL/) for details on the necessary CSS and HTML layout.
0
819
posted 10 years ago by JoshChris
A simple way of displaying a random list item. Could be used to randomly display anything.
Demo: jsfiddle.net/uRd6N/ (keep clicking run)
0
1681
posted 10 years ago by i-am-andy
How can I do a function once a toggleClass has completed?
The .toggleClass method along with all other animation methods return a deferred object that you can access using .promise(). At that point, you can bind to it's done method.
1
629
posted 10 years ago by satie83
Here is a simple and clever way to prevent script conflicts when using jQuery.
This snippet will show how to scope the dollar sign.
2
491
posted 10 years ago by Priestd09