Welcome To Snipplr
Everyone's Recent JavaScript Snippets Tagged navigation
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
« Prev 1 Next »
JavaScript
Set links with href to current page as active (or if in subnav set their parent to active)
look through the list items in your main nav and based on href of anchor tags this will set the top level link to have an 'active' class.
0
1142
posted 13 years ago by iammikecohen
This fixes the downside of the original javascript keyboard navigation snippet I posted here so that if you manually scroll past to a new chapter mark it will register that and keep track of your location better. The old code would ignore any scroll...
2
773
posted 13 years ago by FatFolderDesigner
Starting with GoogleTV in mind I made a script to help navigate a page key basic key inputs, in this case I'm using the left and right arrows to jump between the H1 tags on a page, although the modifications to make it do other things would be very s...
0
781
posted 13 years ago by FatFolderDesigner
Dropdown navigation is fairly inaccessible as it depends on hover events in 99.9% of cases. Tabbing through the navigation with the keyboard fails to reveal the dropdowns leaving those navigation items virtually inaccessible. Worse, each of the hidde...
0
1863
posted 14 years ago by chrisdpratt
Standard list markup, adds button to expand a super dropdown next to the link.
1
1007
posted 15 years ago by davebowker
You'll need to download the latest version of jQuery for this to work, as it is linked in the tag. CSS/XHTML included.
15
2886
posted 16 years ago by dmosher
I'm sure i can clean this up quite a bit, but it works for the moment.
This function looks to see if you are on a selected page. If you are it hides the navigation, then loops through and shows each li one after the other. So they don't all fade i...
0
785
posted 16 years ago by 1man
Haven't had a chance to use this but it looks very promising.
14
1432
posted 17 years ago by aznprncritic
This script allows you to show and hide a at the click of a button. See Show / Hide HTML for Markup.
1
1334
posted 18 years ago by 1man
« Prev 1 Next »