Welcome To Snipplr


Everyone's Recent jQuery Snippets Tagged javascript



Assumes that you have got a #mainnav around your menu. Works nicely with wp_nav_menu inside.
0 2129 posted 14 years ago by telltec
The HTML simply discovers if it's IE and its version or if it's not IE. The jQuery discovers if it's IE, Firefox, Webkit Engine (Chrome and Safari) or Opera and its version as an integer.
1 3208 posted 14 years ago by cesarkohl
Changes 340px with the page footer height. CSS: #top_link{ position:fixed; bottom:20px; right:50%; margin-right:-600px; overflow:hidden; text-indent:-9999px; background:url(../img/top.png) no-repeat 0 0; display:block; width:5...
1 2055 posted 14 years ago by leobetosouza
By omitting [end] it will remove all to the end. Set an [end] with a negative value to count back from the end of the elements. fadeOut is unnecessary.
0 1394 posted 14 years ago by lewiswalsh
Use this for containing all jQuery methods
0 1106 posted 14 years ago by amandalaine
0 1277 posted 14 years ago by jbernus
0 989 posted 14 years ago by realpeterz
Plugin to get and set Element#style.display (e.g. "none" or "")
0 1302 posted 14 years ago by kendsnyder
fix for stucked jquery slide
0 925 posted 14 years ago by jelontok
Loading external scripts on demand the smart way with Head JS
0 1047 posted 14 years ago by kevinlearynet
0 1287 posted 14 years ago by dsoms
No need to create a seperate function for this one. Just one line to clear the default value on click and leave the value when it has been altered.
1 1227 posted 14 years ago by dyteq
Valiodate a form with jQuery.Validate and submit it with jQuery.form
1 1071 posted 14 years ago by marzsman
tinyscrollbar
0 678 posted 14 years ago by daanoz
simple jquery accordion
0 1029 posted 14 years ago by jelontok
When applied to a page, this script converts any sub-menus created in the Wordpress menu editor into drop-down menus without having to specify each menu item individually. Fades in sub-menu of selected list item quickly, then fades out when leaving l...
2 1248 posted 14 years ago by happynuclear
See also the [plain JavaScript version](http://snipplr.com/view/41717/default-value-for-input-fields/).
1 1386 posted 14 years ago by riddla
Simple jQuery script to load additional content when you near the bottom of the page, same sorta thing Twitter does (although I originally programed it for a different use). Only thing of remark is the fact that it stores the current highest loaded v...
4 2189 posted 14 years ago by FatFolderDesigner
0 882 posted 14 years ago by rubdottocom
Just syntax examples here. First block reads, second writes. Top function just a debugging helper. Using jquery 1.5, $(xData.responseXML).find("nodeName=z:row]").each(function(i)... may need to be written as $(xData.responseXML).find("nodeName='z...
0 1883 posted 14 years ago by rumremix
keeps hover states on for top level dropdown menu items or accordions
1 1173 posted 14 years ago by jelontok