Added preventDefault() behavior on Carousel prev/next button click event handlers.
This commit is contained in:
parent
59d101676e
commit
5f6691e059
|
@ -59,9 +59,11 @@ class ImageCarousel extends HTMLElement {
|
|||
const nextButton = $(this).find('.carousel-btn-next');
|
||||
prevButton.click((evt: Event) => {
|
||||
this.plusSlides(-1);
|
||||
evt.preventDefault();
|
||||
});
|
||||
nextButton.click((evt: Event) => {
|
||||
this.plusSlides(1);
|
||||
evt.preventDefault();
|
||||
});
|
||||
this.showSlide(this.slideIndex);
|
||||
}
|
||||
|
@ -149,6 +151,7 @@ image-carousel {
|
|||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 2rem;
|
||||
outline: none !important;
|
||||
}
|
||||
/* .carousel-btn-prev > a span, .carousel-btn-next > a span {
|
||||
position: relative;
|
||||
|
|
Loading…
Reference in New Issue
Block a user