JSFiddle - React, Tailwind, and code Playground

HTML

<form method='post'><input type='submit' id='next' value='Next' /></form>

JavaScript

/*!
 * http://stackoverflow.com/questions/11644542/jquery-slide-right-button-that-hides-the-current-page-div-content-and-shows-the
 */
$(document).ready(function(){
    var pg=1;
    $('#next').click(function (e) {
         if(pg<=10){
            pg=pg+1;
                 alert(pg);
           page_str="page="+pg;
            $.get('/echo/html/', page_str,function(data) {});
          }
        //event.preventDefault();
        return false;
   });
});