Welcome To Snipplr


Everyone's Recent jQuery Snippets Tagged jquery



adapted from the fantastic „Learning jQuery 1.3“ book http://www.packtpub.com/learning-jquery-1.3/book
0 725 posted 14 years ago by cfleschhut
Select the first and last item in an unordered list. As an example, I add a CSS class to each. In WordPress, it's not so easy to get wp\_list\_pages() to generate these classes. jQuery provides an easy out for javascript-enabled clients.
0 832 posted 14 years ago by cyberhobo
inspired by boagworld.com
1 600 posted 14 years ago by cfleschhut
If you want to trigger an event on an matched element and that element may be introduced into the DOM from an Ajax request, you can still match against it by using the livequery plugin and the following code.
1 565 posted 14 years ago by Meander365
This slide show was created by Jon Raasch @ JonRaasch.com. Just images. Look for Slide show #2 for a slide show using DIVs. hamiltopia_jquerySlideshow2
3 1115 posted 14 years ago by thehamilton
Simple jQuery Slideshow from JonRaasch.com
1 756 posted 14 years ago by thehamilton
To prevent multiple submit from sending more than one request, bind the submit event and store a "disabledOnSubmit" data. Next time the event "submit" will be fire, the following jQuery code will return false. All submit buttons are also disabled (...
9 976 posted 14 years ago by dalexandre
Sometimes you click a link like faq.html#item5 and, after the browser jumps you to the anchor, you have trouble spotting the item you're looking for. anchorAway is a little function that helps you call a function on anchored items, maybe something li...
0 545 posted 14 years ago by dougunderscorenelson
Uses jquery and raw javascript to quickly add a class to the body class depending on what kind of page it is.
0 674 posted 14 years ago by chrisjlee
Easily target elements which have certain attributes using jQuery
1 447 posted 14 years ago by davebowker
I'm new to jQuery, so please be kind if there are any errors or redundancies in the code. The problem: Basically, we were getting tons of scammers signing up on our Kickapps hosted community. They were immediately posting dozens of RSS feeds & lin...
0 925 posted 14 years ago by Jdonner
Couldn't find a better way to do this, nor could I find it on teh interwebs, so here it is.
2 1069 posted 14 years ago by wjbrown
Used this on a project to determine whether images were loaded or not. In an image carousel, for example, you could test the next/clicked image before advancing the slide, and if 'loaded' wasn't 'true', you could add a "loading" class and attach a ne...
3 481 posted 14 years ago by dougunderscorenelson
One way to fix many of the issues with IE7 is to dynamically reverse the default z-index stacking order of the elements on your page. This will ensure the elements higher in your HTML source will also have a higher z-index order on your page, solving...
3 738 posted 14 years ago by justinseiter
Modified the code very slightly to add in cursor states for when the timeline is grabbed. Also added in (but commented out) the code to make the sliding twice as fast using a multiplier.
0 576 posted 14 years ago by davebowker
Quick little clientside script to pick out every 3rd image and add a class of last to it. I needed this because the images were layed out in 3 columns, adding a margin to the right hand side would leave a large gap on the right hand side which i d...
0 855 posted 14 years ago by 1man
Text beim tippen wo anders anzeigen
1 564 posted 14 years ago by skrippendorf
Quickly get the index of the current element. I find myself re-using this several times in a document, so I made a lil' function for it.
3 1038 posted 14 years ago by dougunderscorenelson
This is the code to add to a website to listen for the Konami Code (as implemented on jQuery.com"
6 745 posted 14 years ago by JakeCarter
If you ever need to list all the internal functions of JQuery without the use of googling. You can always use the following command with firebug.
1 674 posted 14 years ago by chrisjlee
Version differs slightly from the demo, as the src for the thumbnail image is a child of the demo example, so has been slightly modified.
0 712 posted 14 years ago by davebowker
Use javascript to add a class of last onto the first and the last li tags in the navigation (add to global.js). Then use css to style. For instance, if the first li is home, you can set the css to hide this link (if you want the logo to act as your h...
5 906 posted 14 years ago by kstetson
Div will fade in on load or fade in on click
1 869 posted 14 years ago by kstetson
Used to share between a single instance of jQuery through iFrames. Do note, the iFrame content must originate from the same domain, or this plugin will NOT work as expected.
4 1039 posted 14 years ago by garside
A clean and simple drop down menu made in jQuery
1 944 posted 14 years ago by Unreal
1 630 posted 14 years ago by philokezzar
Used here: http://www.criteriondg.info/wordpress
1 532 posted 14 years ago by Skeku