Fade out Caption on Scroll
Hello Dmitry,
now i have a Slider related issue :)
I try to fade out the rsBlock of the Slider by scrolling the
page. Here is the Link: http://xancoremedia.com/royal/
I´ve put this Code inside the royalSlider but it doesent
work. You can see it in the Source Code. Can you help me?
var divs = $('.rsABlock'); $(window).scroll(function(){
var percent = $(document).scrollTop() / ($(document).height() -
$(window).height()); divs.css('opacity', 1 - percent);
});
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Dmytro Semenov on 10 Oct, 2012 06:26 AM
Hi,
Slide HTML may not be added to DOM immeditely after initializaation, so you should bind all events before initialization, or just check if block exists. e.g.:
Dmitry
2 Posted by kreativos_theme... on 10 Oct, 2012 06:42 AM
Works perfectly! Thanks Dmitry.
kreativos_themes closed this discussion on 10 Oct, 2012 06:42 AM.