Before APEX 18.1 you should use:
apex.region("emp").widget().interactiveGrid
instead of
apex.region("emp").call
Demo is available here.
apex.region("emp").call("getViews").grid.view$.data("apex-grid").pageSize;
apex.region("emp").call("getActions").get("change-rows-per-page");
apex.region("emp").call("getViews").grid.view$.grid('option','rowsPerPage');
apex.region("emp").call("getActions").set("change-rows-per-page", 10)
apex.region("emp").call("getViews").grid.model.getTotalRecords();
apex.region("emp").call("getViews").grid.view$.grid('gotoPage',2);
// First Page
apex.region("emp").call("getViews").grid.view$.grid('firstPage');
// Last Page
apex.region("emp").call("getViews").grid.view$.grid('lastPage');
// Previous Page
apex.region("emp").call("getViews").grid.view$.grid('previousPage');
// Next Page
apex.region("emp").call("getViews").grid.view$.grid('nextPage');
// Go To Page (it's zero based - 0 goes to page 1)
apex.region("emp").call("getViews").grid.view$.grid('gotoPage',0);
// Get Current Page
var gridData = apex.region("emp").call("getViews").grid.view$.data("apex-grid");
var currentPage = Math.floor(gridData.pageOffset / gridData.pageSize) + 1;
var gridData = apex.region("emp").call("getViews").grid.view$.data("apex-grid");
var currentPage = Math.floor(gridData.pageOffset / gridData.pageSize) + 1;
console.log(currentPage);