JSFiddle - React, Tailwind, and code Playground

HTML

<input value=" Next " type="button"/>
<input value=" Prev " type="button"/>
<input value=" Show All " type="button"/>
<div id="divWiz"></div>

JavaScript

$(function() {
    var i, cutoff, total = 50;
    for(i=0; i<total; ++i)
        $(document.createElement("div")).html(i).appendTo("#divWiz");
    
    cutoff = total/2;
    
    $("#divWiz > div").hide();
    $("#divWiz > div:lt("+cutoff+")").show();
    
    $("input[value=' Next ']").click(function() {       
        $("#divWiz > div").hide();        
        $("#divWiz > div:gt("+(cutoff - 1)+")").show();
    });
    
    $("input[value=' Prev ']").click(function() {       
        $("#divWiz > div").hide();        
        $("#divWiz > div:lt("+cutoff+")").show();    });    
    
    $("input[value=' Show All ']").click(function() {       
        $("#divWiz > div").show();        
    });        
});