JSFiddle - React, Tailwind, and code Playground
by juanojeda
JavaScript
var _action_slide = function(direction){
// check which direction the user wants
var controlDirection = direction == 'next' ? -1 : 1;
// grab current margin position
slidePos = slide.first.css('marginLeft');
// Combine the direction with the slideDist and the current position
slideDist = options.slideDist * slideWidthOuter * direction;
// if the distance tries to go too far, set it to just one margin unit
// If the user hit 'next', check to see if there are more slides to show
// If not, change the next button to the Add More button
};