Рет қаралды 2,922
I forgot to set position "relative" on Rich Text block, so don't forget to fix it.
Я забыл поставить position "relative" на Rich Text block, так что не забудьте добавить это.
This animation:
webflow-samples...
Clone this project:
webflow.com/we...
Telegram channel:
t.me/webflow_io
__________
Body code:
(script)
var AllPageArray = document.getElementsByClassName('w-dyn-item');
var i = AllPageArray.length;
console.log(i);
var zIndex = 0;
$(function() {
$('.cms-book-arrow-right').on('click', function(e) {
e.preventDefault();
setTimeout(function(){
if(i == 1){
}else{
var element = AllPageArray[i - 2];
element.style.zIndex = zIndex + 1;
i--;
zIndex++;
}
}, 300);
});
});
$(function() {
$('.cms-book-arrow-left').on('click', function(e) {
e.preventDefault();
setTimeout(function(){
var element = AllPageArray[i - 1];
element.style.zIndex = "0";
i++;
zIndex--;
}, 300);
});
});
(/script)