Welcome To Snipplr


Everyone's Recent jQuery Snippets



1 ... 20 21 22 23 24 ... 30
Sometimes, you need a jQuery tab that will close. Finding the right way to do that has been a challenge for me, personally. This is especially true when you are adding new tabs dynamically. The trick is getting the proper index of the closable elemen...
0 401 posted 13 years ago by tbelknap
Keeping track of complex forms - especially those that exist within multiple jQuery UI tabs - can be a pain. This is a simple little function that will reorganize all visible inputs, buttons, drop-downs and links. Use it whenever switching between ta...
0 379 posted 13 years ago by tbelknap
execute javaScript only for iphone / ipad / ipod using jQuery, triggered on page load
7 1354 posted 13 years ago by humanoid
While there seem to be plenty accordion examples built with jQuery, I had trouble finding one that both worked well and was easily styled. UI Tabs is a pain in the ass to modify and adds a crap load of extra DOM elements that must be accounted for wh...
2 447 posted 13 years ago by jHulbert
on using any wysiwyg editor (f.e. CKEditor) is inserted link to anchor on same page in this form: [a href="#anchor"]text[/a] if on web site is used tag BASE, anchors links are wrong - on all page are on this url: www.domain.com/#anchor this fun...
0 535 posted 13 years ago by knedle
This overrides a couple core Drupal functions in the autocomplete.js file. It changes the behavior of the autocomplete such that if a user selects an item from the autocomplete menu, it takes them directly to that node instead of just populating the...
1 461 posted 13 years ago by unravelme1
Don't know if the code is working, it's written from memory, but I think it will work....
1 450 posted 13 years ago by sbglasius
Each image button requires two images to represent two states: the off-state and the on-state. In this case, the on-state has "_ovr" appended.
0 527 posted 13 years ago by nijgnet
This jQuery plugin can be used to detect when the user smashes their keyboard. You can set a threshold as to how many keys need to be depressed in order to trigger the event.
1 542 posted 13 years ago by adamcoulombe
0 301 posted 13 years ago by tscheckenbach
simple jquery show and hide
0 437 posted 13 years ago by satonthat
Function to reset a complete form to there default value.
0 395 posted 13 years ago by frankyfish
jQuery plugin that let you specify a maximum length on a text field and optionaly specify the change the focus when that maximum length has been reach. Nice when making multiple input text to create a telephone form. Example: $("#telephone_1").maxLe...
0 393 posted 13 years ago by frankyfish
What it does is look for img tag and on rollover change the source path from "anyimage.jpg" to "anyimage_hover.jpg". It add the suffix "_hover" at the end of the src name without changing the extension. If you look at the code you will see that it al...
0 473 posted 13 years ago by frankyfish
Show/hide an paragraph when you click on the h2, suppose you have: <h2><a href="#">Designer info</a></h2> <p>Lorem ipsum dolor sit amet.</p> You can show/hide the paragraph with the code below.
0 348 posted 13 years ago by marcelodornelas
This is a method that I use to easily wrap an HTML container with nice curly quotes. I much prefer this method over using images because the quotes can be easily stylized using css fonts, colors, and sizes. Also, the markup is semantically correct.
1 625 posted 13 years ago by MikeyLikesIt
include jQuery, jQuery ui and jQuery cookie plugin. Simple.
0 710 posted 13 years ago by vagrantradio
NOTE: THIS HAS BEEN MOVED TO GITHUB: If you have any ideas or improvements for this script feel free to fork or contribute or discuss over there: https://github.com/adamcoulombe/jquery.customSelect Plugin Download: http://www.adamcoulombe.info...
2 1056 posted 13 years ago by adamcoulombe
0 443 posted 13 years ago by mariusscheel
1. Use absolute positioning to place label over the text box 2. Hide label except when JS is enabled 3. Use jQuery to hide label when field receives focus
1 426 posted 13 years ago by flicity
A lightweight, collapsable menu script that works no matter how many nested lists there are.
1 333 posted 13 years ago by matthalliday
Quick and dirty but it does the job.
0 554 posted 13 years ago by vagrantradio
If body has lang="fr" then add a special class. We can't use the CSS pseudo selector :lang(fr) because there is currently no support in Safari.
0 354 posted 13 years ago by matthalliday
1 ... 20 21 22 23 24 ... 30