Fix slider behaviour
This commit is contained in:
parent
155b10cc9d
commit
d0680529a5
2 changed files with 7 additions and 5 deletions
|
@ -65,10 +65,12 @@ function mountSlider() {
|
||||||
function changeSlideOnClick() {
|
function changeSlideOnClick() {
|
||||||
if (homeSection && slider) {
|
if (homeSection && slider) {
|
||||||
homeSection.addEventListener('click', function(e) {
|
homeSection.addEventListener('click', function(e) {
|
||||||
if (e.clientX >= window.innerWidth / 2) {
|
if (!e.target.closest('.navigation__link') && !e.target.closest('.social__link')) {
|
||||||
slider.go('>');
|
if (e.clientX >= window.innerWidth / 2) {
|
||||||
} else {
|
slider.go('>');
|
||||||
slider.go('<');
|
} else {
|
||||||
|
slider.go('<');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue