Prevent flipping more than 2 cards at one

Just to make sure no one is clicking more than two cards at time, which would be a little confusing for users.
pull/8/head
Raúl Martínez 2016-03-07 12:15:27 +01:00
parent 92e9cd5273
commit 65a25e6205
1 changed files with 4 additions and 2 deletions

View File

@ -37,8 +37,10 @@
* Flip card.
*/
self.flip = function () {
if (jQuery('.h5p-flipped').length < 2) {
$card.addClass('h5p-flipped');
self.trigger('flip');
}
};
/**