Well things are getting more complex now. Rather than me code all this up for you, I'd recommend you step through some of the jQuery tutorials. You will need to use stopPropagation() on the click of the button. This will prevent the click event from bubbling up the DOM and triggering the flip you added to the div.
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot