Change ul style when arriving to div(scrolling)

后端 未结 6 1497
-上瘾入骨i
-上瘾入骨i 2020-12-18 17:24

I would like to change a ul style on scrolling and arrive to div using jQuery, explanation down.

CSS:

#menu {
    background-color:#ccc;
    position         


        
6条回答
  •  爱一瞬间的悲伤
    2020-12-18 17:52

    Yes, you need jQuery, but I do not understand: You must apply menutext2 class when the scroll bars to see div1 or when you click div1?

    set event (click or scroll and apply)

    $('.menu').removeClass('menutext').addClass('menutext2');
    

提交回复
热议问题