Access - Ryan-Rutledge/FlashcardStacks GitHub Wiki
The fc class contains an associative array of Stack objects named stacks. The key for each stack is its element id.
// Store stack with HTML id 'unique_id' in variable 'curStack'
var curStack = fc.stacks['unique_id'];
// Flip current flashcard in curStack left
curStack.moveCard(fc.MOVEMENT.LEFT);The fc class also contains arrays pointing to Stack objects according to their active enablers:
-
tiltStacks- List of tilt enabled stacks -
dragStacks- List of drag enabled stacks -
clickStacks- List of click enabled stacks -
swipeStacks- List of swipe enabled stacks -
arrowkeyStacks- List of arrowkey enabled stacks
// Flip current card right in all stacks with tilting enabled
fc.tiltStacks.forEach(function(stack) {
stack.moveCard(fc.MOVEMENT.RIGHT);
});