bind arrows
This commit is contained in:
parent
2e6e65862a
commit
039e80a55d
18
main.js
18
main.js
@ -513,6 +513,24 @@
|
||||
},
|
||||
})
|
||||
|
||||
bindArrowForGallery('.swiper-button-prev', '.swiper-button-next')
|
||||
}
|
||||
|
||||
function bindArrowForGallery(leftButtonQuery, rightButtonQuery) {
|
||||
document.addEventListener("keydown", function(e) {
|
||||
switch(e.key) {
|
||||
case "ArrowLeft":
|
||||
$(leftButtonQuery).click()
|
||||
break
|
||||
|
||||
case "ArrowRight":
|
||||
$(rightButtonQuery).click()
|
||||
break
|
||||
|
||||
default: return
|
||||
}
|
||||
e.preventDefault()
|
||||
})
|
||||
}
|
||||
|
||||
function createSendButtons() {
|
||||
|
Loading…
Reference in New Issue
Block a user