question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Active classname for all visible elements

See original GitHub issue

Is your feature request related to a problem? Please describe. I’m not 100% sure if it’s a feature request, bug or is it already possible with current version.

Describe the solution you’d like Right now if slidesPerPage > 1, only one item gets className BrainhubCarouselItem--active. Is there a way to add this className to every currently visible element? Or something else, like BrainhubCarouselItem--visible etc…

Describe alternatives you’ve considered I tried working around it by altering classnames of children passed down to carousel and calculating (or assuming) when they are visible, but I think it’s mixing responsibilities, so I dropped this idea.

Additional context Add any other context or screenshots about the feature request here.

Cały_ekran_10_03_2020__11_27

Thanks in advance for your help!

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
PiotrSzlaguracommented, Mar 10, 2020

I’ll try to approach this today 😃

0reactions
piotr-s-brainhubcommented, May 14, 2020

@PiotrSzlagura

So I’m OK with that, it can be a non-integer.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Check if a class `active` exist on element with jquery
You can retrieve all elements having the 'active' class using the following: $('.active'). Checking wether or not there are any would, i belief,...
Read more >
active - CSS: Cascading Style Sheets - MDN Web Docs
The :active CSS pseudo-class represents an element (such as a button) that is being activated by the user. When using a mouse, ...
Read more >
How To Add Active Class To Current Element - W3Schools
Learn how to add an active class to the current element with JavaScript. ... Get all buttons with class="btn" inside the container var...
Read more >
:visible Selector | jQuery API Documentation
visible selector. Description: Selects all elements that are visible. ... Visible elements have a width or height that is greater than zero.
Read more >
Display property - Bootstrap
Quickly and responsively toggle the display value of components and more with our display utilities. Includes support for some of the more common...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found