0

I want to determine the width of the captions of the different slides. Actually, it's not a huge problem I thought as the procedure is quite clear for me. Nonetheless, I came across an obstacle. That is to say: I can only calculate the width of the current active slide. The width of the inactive slides will always be 0. Is there a way to calculate the width of the inactive slides? Here is a demo When setting the active class to a different item manually, then the width of this item will be calculated. Just have a look at the console.

Sheldon
  • 959
  • 2
  • 9
  • 16

1 Answers1

0

I've just found a solution on my own. I solved it by adding temporarily the active class to those items not having it, calculated the width and then removed the class again. Here the code. If any body should have a better solution, please don't hesitate to share it.

Sheldon
  • 959
  • 2
  • 9
  • 16