Widget:SchematicListSort

<-- Previous Page Next Page --> Searchable on the desktop!

RLQ.push(function {  var currentPage = 1;  var maxPage = 6;

$schml = $('.dnl-schematics-sort'); $btn = $schml.find('.dnl-btn');

$btn.on('click', function(event) { 	var button = $(event.target);

if (button.hasClass('next-page') == true) { turnPage("forward"); }

if (button.hasClass('prev-page') == true) { turnPage("reverse"); } });

function turnPage(direction) { if (direction == "forward") { $('.page'+currentPage).hide; currentPage = currentPage + 1; pageCheck(currentPage); $('.page'+currentPage).show; }

if (direction == "reverse") { $('.page'+currentPage).hide; currentPage = currentPage - 1; pageCheck(currentPage); $('.page'+currentPage).show; } }

function pageCheck(crntPg) { if (crntPg > maxPage) { currentPage = 1; return 1; } if (crntPg <= 0) { currentPage = maxPage; return maxPage; } }

});