Skip to content
This repository has been archived by the owner on Oct 20, 2018. It is now read-only.

Highlight middle item on aarrow click and slide #68

Open
Vishnu-Priya-M opened this issue Dec 9, 2017 · 1 comment
Open

Highlight middle item on aarrow click and slide #68

Vishnu-Priya-M opened this issue Dec 9, 2017 · 1 comment

Comments

@Vishnu-Priya-M
Copy link

Hi,

Is it possible to add custom css to make the middle item highlight in the 3 grid list . Need the middle item highlight all the time( While cliking on arrows and sliding)

Thanks,
Vishnu Priya

@sheikalthaf
Copy link
Owner

sheikalthaf commented Dec 10, 2017

In your html

<ngx-carousel
      [inputs]="carouselBanner"
      [moveToSlide]="2"
      (onMove)="onmoveFn($event)"
      (carouselLoad)="loadItemsFn()"
      (afterCarouselViewed)="afterCarouselViewedFn($event)">
</ngx-carousel>


In your typescript

/* It will be triggered on every slide*/
  onmoveFn(data: NgxCarouselStore) {
    console.log(data);
    data.visibleItems.start
    data.visibleItems.end
    //based on the start and end find the middle item and add your class
  }
‘‘‘

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants