Welcome To Snipplr
Everyone's Recent jQuery Snippets Tagged javascript
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Assumes that you have got a #mainnav around your menu. Works nicely with wp_nav_menu inside.
0
575
posted 12 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
1224
posted 12 years ago by cesarkohl
jQuery
Create a dynamic \"Link to top of page\" with fade and positioned at some pixels of bottom when scrolls to this position
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
967
posted 12 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
651
posted 12 years ago by lewiswalsh
Plugin to get and set Element#style.display (e.g. "none" or "")
0
611
posted 12 years ago by kendsnyder
Loading external scripts on demand the smart way with Head JS
0
496
posted 12 years ago by kevinlearynet
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
598
posted 12 years ago by dyteq
Valiodate a form with jQuery.Validate and submit it with jQuery.form
1
516
posted 12 years ago by marzsman
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
634
posted 13 years ago by happynuclear
See also the [plain JavaScript version](http://snipplr.com/view/41717/default-value-for-input-fields/).
1
699
posted 13 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
1130
posted 13 years ago by FatFolderDesigner
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
1033
posted 13 years ago by rumremix
keeps hover states on for top level dropdown menu items or accordions
1
604
posted 13 years ago by jelontok