• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] Custom css file on scroll

Started by mihai,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mihaiTopic starter

Hi i wanna add some content(css codes) for my website but it must be active only one scroll.Pretty much like the backtotop btn.
  •  

mihaiTopic starter

  jQuery(".customdiv").addClass("customcss");
    jQuery(window).scroll(function () {
        if (jQuery(this).scrollTop() === 0) {
            jQuery(".customdiv").addClass("customcss")
        } else {
            jQuery(".customdiv").removeClass("customcss")
        }
    });


Now customdiv should be my div and i wanted to have customcss on scroll,is this function correct?
  •  

PHPVibe A.

Salut Mihai, gasesti foarte multa informatie despre asa ceva pe Google https://www.google.ro/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=making+a+div+show+up+on+scroll
Nu are legatura cu PHPVibe si sincer ma pricep prea putin la javascript ca sa-ti dau o parere iar Mario e super ocupat acum.

mihaiTopic starter

Multumesc pentru link.m-a ajutat,am rezolvat ce am vrut.
  •  

Similar topics (7)