PHP Classes

File: test/test.js

Recommend this page to a friend!
  Classes of Nikos M.   Alt PHP Paginator   test/test.js   Download  
File: test/test.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Alt PHP Paginator
Generate pagination controls for Web pages
Author: By
Last change:
Date: 2 years ago
Size: 524 bytes


Class file image Download
"use strict"; var Paginator = require(__dirname+'/../src/js/Paginator.js'); function echo(s) { console.log(String(s) + "\n"); } echo('Paginator.VERSION = ' + Paginator.VERSION + "\n"); var p1 = new Paginator(100, 10); var p2 = (new Paginator(1000, 10, 3)) .previousText('Prev') .nextText('Next') .placeholder('{page}') .urlPattern('/category/{page}') ; var p3 = new Paginator(100, 10, 2); echo(p1); echo(p2); echo(p3); echo(p1.view('mobile')); echo(p2.view('mobile')); echo(p3.view('mobile'));