dimanche 15 février 2015

CSS/Javascript multiple div flip with class's and id's


I'm a bit new at CSS/Javascript (really don't know much about Javascript at all). I'm trying to flip multiple div's on the same page, using code I've found elsewhere (jsfiddle) and modifying for my own needs.


Right now, my problem is that if I click a div to flip it, other div's on the page flip as well. I have looked through this site, and understand that I can't use class, I have to use an id. I have tried to do so, but I can't seem to get it to work at all. I'm wondering if my Javascript needs to be tweaked?


My sample code is here. Ideally, I'd like to keep as much of this Javascript as possible, because content on either side of the div's that are flipping will be different sizes, and this Javascript solves that small problem.


Any suggestions/hints/ideas as to how to put an id in each div to ensure that they will flip individually would be greatly appreciated.


Cheers!





Aucun commentaire:

Enregistrer un commentaire