Answer the question
In order to leave comments, you need to log in
How to disable the left arrow on scroll?
<div class="pull-left mt-sm">
<i class="icon-arrow-left pointer" (click)="scrollLeft()"></i>
</div>
<div #widgetsContent class="custom-slider-main">
<div class="info-box">
<img src="file.jpg" class="info-box">
</div>
<div class="info-box">
<img src="file.jpg" class="info-box">
</div>
<div class="info-box">
<img src="file.jpg" class="info-box">
</div>
<div class="info-box">
<img src="file.jpg" class="info-box">
</div>
<div class="info-box">
<img src="file.jpg" class="info-box">
</div>
<div class="info-box">
<img src="file.jpg" class="info-box">
</div>
</div>
<div class="pull-right mt-sm">
<i class="icon-arrow-right pointer" (click)="scrollRight()"></i>
</div>
@ViewChild('widgetsContent') widgetsContent: ElementRef;
scrollLeft(){
this.widgetsContent.nativeElement.scrollLeft -= 150;
}
scrollRight(){
this.widgetsContent.nativeElement.scrollLeft += 150;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question