Forums

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?

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #38986
    JohnMotylJr
    Participant

    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.

    #106452

    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);
    }‚Äč
    #106453
    JohnMotylJr
    Participant

    Holy ham sammich, i guess i am trying to make things harder. Thanks josh

    #106454

    @_John_ No worries :)

    #106455
    JohnMotylJr
    Participant

    @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?

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.