- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › How would i add this css style with jQuery?
So im working with this right herrr….
::-webkit-scrollbar {
width: 12px;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
border-radius: 10px;
}
::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
}
I want to have some jquery that would change those rgba
values on a hover event. I could simply just use :hover but if i did that than i would be only adjusting the color values when i hover on the scroll bar and not the div that it lives in..
I’ll post a jsfiddle when i get some headway.
You can still do it using CSS alone: http://jsfiddle.net/joshnh/bWwNN/
div:hover::-webkit-scrollbar-track,
div:hover::-webkit-scrollbar-thumb {
box-shadow: inset 0 0 6px rgba(0,0,0,1);
}
Holy ham sammich, i guess i am trying to make things harder. Thanks josh
@_John_ No worries :)
@joshuanhibbert, i guess a two parter would be,
Is there anyway to add css3 transitions or jquery for a graceful easing effect when hovering rather than the standard hover?