
Best Answer Cheren-dow , 17 January 2014 - 08:42
В приведенном коде обращение идет к классу mor
if ( $(this).scrollTop() > 50 ){ $(".mor").css({ opacity : "0.2" } ); } else if( $(this).scrollTop() < 50 ) { $(".mor").css({ opacity : 1 }); }
Сделайте обращение к вашему ID
if ( $(this).scrollTop() > 50 ){ $("#headerbar").css({ opacity : "0.2" } ); } else if( $(this).scrollTop() < 50 ) { $("#headerbar").css({ opacity : 1 }); }
На это событие, вместо класса .xor вставьте свой
$(".xor").click(function(){ $("html, body").animate({ scrollTop: 0 }, 1000 ); return false; });
Не понимаю в чем у вас загвостка....
Go to the full post