Joined July 2012

Phil Renaud

Developer/Designer at
Halifax, Nova Scotia, Canada

Hi gehwissenlos - this code should be placed within a scroll function,

On for example, I'm doing this:

    var scrollVar = $(window).scrollTop();
    $('section#about .inner').children('h2').css({'top': .7*scrollVar });
    $('section#about .inner').children('h2').css({'opacity':( 100-scrollVar )/100});

If you're doing this from an editor to a webpage, maybe have this triggered on a focus() event of the page in question?

343 Karma
28,024 Total ProTip Views