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 1007 posted 13 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 1839 posted 13 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 1479 posted 13 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 1116 posted 13 years ago by lewiswalsh
Use this for containing all jQuery methods
0 918 posted 13 years ago by amandalaine
0 1052 posted 13 years ago by jbernus
0 860 posted 14 years ago by realpeterz
Plugin to get and set Element#style.display (e.g. "none" or "")
0 1031 posted 14 years ago by kendsnyder
fix for stucked jquery slide
0 754 posted 14 years ago by jelontok
Loading external scripts on demand the smart way with Head JS
0 858 posted 14 years ago by kevinlearynet
0 1085 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 994 posted 14 years ago by dyteq
Valiodate a form with jQuery.Validate and submit it with jQuery.form
1 897 posted 14 years ago by marzsman
tinyscrollbar
0 586 posted 14 years ago by daanoz
simple jquery accordion
0 845 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 1060 posted 14 years ago by happynuclear
See also the [plain JavaScript version](http://snipplr.com/view/41717/default-value-for-input-fields/).
1 1146 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 1651 posted 14 years ago by FatFolderDesigner
0 756 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 1514 posted 14 years ago by rumremix
keeps hover states on for top level dropdown menu items or accordions
1 995 posted 14 years ago by jelontok