Mobile compatibility for pagination
This commit is contained in:
parent
6f154234b3
commit
e7107c20b9
@ -510,13 +510,23 @@ jQuery(document).ready(function($)
|
||||
|
||||
|
||||
// pagination
|
||||
function getPageRange()
|
||||
{
|
||||
if (window.innerWidth >= 600)
|
||||
return 6;
|
||||
else if (window.innerWidth < 600 && window.innerWidth > 450)
|
||||
return 4;
|
||||
else
|
||||
return 2;
|
||||
}
|
||||
|
||||
var currentPage = 0;
|
||||
var previousArray = []
|
||||
var options =
|
||||
{
|
||||
dataSource: paintingList,
|
||||
pageSize: pageSize,
|
||||
pageRange: 6,
|
||||
pageRange: getPageRange(),
|
||||
className: 'paginationjs-theme-ginou',
|
||||
callback: function (response, pagination)
|
||||
{
|
||||
|
@ -38,13 +38,23 @@ jQuery(document).ready(function($)
|
||||
if (urlParams.get('page') != "")
|
||||
targetPage = urlParams.get('page');
|
||||
|
||||
function getPageRange()
|
||||
{
|
||||
if (window.innerWidth >= 600)
|
||||
return null;
|
||||
else if (window.innerWidth < 600 && window.innerWidth > 450)
|
||||
return 4;
|
||||
else
|
||||
return 2;
|
||||
}
|
||||
|
||||
var currentPage = 0;
|
||||
var previousArray = []
|
||||
var options =
|
||||
{
|
||||
dataSource: paintingList,
|
||||
pageSize: pageSize,
|
||||
pageRange: null,
|
||||
pageRange: getPageRange(),
|
||||
className: 'paginationjs-theme-ginou',
|
||||
callback: function (response, pagination)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user