Domanda

I need a way to scroll two separate "divs" (actually <nav> and <section>, but lets call them div's for simplicity) individually.

One is a vertical nav on the left, the other is a section. Whenever either overflows I want a custom scrollbar to appear inside the div, and when they are scrolled the other one should remain unchanged.

My guess is I have to do this with jQuery? All I got sofar is overflow: hidden; in <body> to hide the standard scrollbars. What's the easiest way to add the custom scrollbars?

È stato utile?

Soluzione

Have a look at jScrollPane

jScrollPane is a cross-browser jQuery plugin by Kelvin Luck which converts a browser's default scrollbars (on elements with a relevant overflow property) into an HTML structure which can be easily skinned with CSS.

Altri suggerimenti

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top