Welcome To Snipplr


Everyone's Recent jQuery Snippets Tagged jquery



1 1134 posted 16 years ago by philokezzar
I made an absolute tinny code to find the highest z-index of absolute DIV to show my shouting box and to make it appear absolutely at the top of all html elements. I used selector of ”body > *‘ instead of ‘body *‘. ”body > *‘ means...
2 1769 posted 16 years ago by adnan
@davidlink aim: instanteggrolls
2 1928 posted 16 years ago by conspirator
1 1413 posted 16 years ago by kokikr
The markup would look like this: <code> &lt;input class="swap-value" type="text" value="Search"/ &gt;</code>
2 1509 posted 16 years ago by keith
Hi, all, this is the "checkFunction" extension for jQuery. This extension takes two parameters: 1. fPointer This parameter is the "possible" function to check 1.1 This parameter can be a String that is a function poi...
1 1314 posted 16 years ago by amischol
0 1216 posted 16 years ago by chrisaiv
This is how NetTuts does their filterable Portfolio.
3 1593 posted 16 years ago by conspirator
HRs are a pain in the ass to style, so why bother? Wrap them in a DIV with a class of HR instead. (In your stylesheet, set .hr hr { display: none }). This also ports the class of the HR up to the new parent DIV, allowing you to make a few differen...
1 1131 posted 16 years ago by dougunderscorenelson
This adds a class to focused form elements (helpful for IE6/7), as well as adds a class to the input's parent (in this case, named "form-field").
1 1420 posted 16 years ago by dougunderscorenelson
Quick script to find button elements (and elements with the "button" class) and wrap their innards in spans. Good for making rounded-corner buttons.
0 1169 posted 16 years ago by dougunderscorenelson
I believe that Accrisoft has a fetch all images from db function built in, but you could always use some php to create the image array
5 1718 posted 16 years ago by conspirator
1 1542 posted 16 years ago by conspirator
1 1452 posted 16 years ago by demixo
One must escape "special characters" in id names using two backslashes.
0 1510 posted 16 years ago by penguin999
1 1391 posted 16 years ago by Uzbekjon
I used this simple snippet to enable users to "View More Info" which was embedded in a div below each of a list of items. This is different from many of the simple jQuery examples that only allow you to show/hide one particular div.
1 1521 posted 16 years ago by aristoworks
This script preloads images in your document or lets your to preload images by their url and insert or append them in your DOM tree later.
5 1625 posted 16 years ago by Uzbekjon
This was not written by me, but Jeffrey Olchovy. I uploaded it here because his blog messes up the quotes.
10 1982 posted 16 years ago by oscargodson
really simple random bg image. Save images starting at 1.jpg. Put in your jquery selector. Etc, etc.
8 1886 posted 16 years ago by ira
Great little snippit to add a <tr> to the bottom of a table. Note the use of the context in the jQuery e.g var n = $('tr:last td', this).length; Will have to use this in the future, very good to know!
4 2951 posted 16 years ago by 1man
Lets you get YouTube video scene images by video id or youtube video url using only javascript OR jQuery.
5 2884 posted 16 years ago by Uzbekjon
Appends a css class to all form input elements on a page by extracting the input type from the element in question.
0 781 posted 16 years ago by stylephreak
A very simple plug-in I wrote to make x number of columns equal height. Looks for the column with the biggest height then sets the rest to the same. I'm sure it can be made cleaner, will look into that later.
4 1838 posted 16 years ago by 1man
6 1489 posted 16 years ago by joeydi
Adding a namespace to an event can make it easier to unbind. It is very easy to unbind all events with the same namespace.
1 1622 posted 16 years ago by 1man
Never used the index() method in jQuery but could be useful to know. Find a selected elements index when you click on it. Note the $('ul#mylist') inside the index method, gives the search some context of where to look for .selected, saves looking thr...
1 1596 posted 16 years ago by 1man
jquery ui/tabs initiation ensures screenreaders can focus content when selecting tabs. Tested using Jaws 8.
3 1291 posted 16 years ago by terrencewood
Simple imagefader to rotate around a few images. Seem to be doing this a lot in various projects so decided to put something a bit more generic together. Uses jQuery. Images named as car1.jpg, car2.jpg, car3..... etc.
3 1788 posted 16 years ago by 1man
[Video Example](http://screencast.com/t/L6E0xI0J5P) A cross browser image caption on mouseover. Using jquery, CSS. This is a bit crude but pretty simple to implement. Just change the image width, some css to match that image size and create dyn...
4 1856 posted 17 years ago by jadedbat