Topic: How can i tell via javascript which side of a rotated card is showing?

Melinda Beavers pro asked 5 years ago

Is there an attribute or property i can query to be able to tell which side of a rotating card is showing?

Melinda Beavers pro answered 5 years ago

Thank you so much, Joel and Rafal!

Rafał Rogulski free answered 5 years ago

Hi Melinda, You can check it by checking if an element has an appropriate class added.
<!--Rotating card-->
<div class="card-wrapper">
    <div id="card-1" class="card-rotating effect__click">
<!--/.Rotating card-->  
If the card is in default position div with id="card-1" have only classes which give it style, when a card is rotated to this div is added class flipped wich start the animation and rotate a card. Regards

joel.jdesignera pro answered 5 years ago

You could probably do a check with javascript for the class flipped on the card itself.

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.


Specification of the issue

  • User: Pro
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No