Namespace viewport function

This commit is contained in:
Brian Miyaji
2015-09-17 12:23:40 +10:00
parent 6d6169e608
commit 833f8d20b7

View File

@@ -1,4 +1,4 @@
function viewport() {
function sp_viewport() {
var e = window, a = 'inner';
if (!('innerWidth' in window )) {
a = 'client';
@@ -43,7 +43,7 @@ function viewport() {
/* Data Tables */
$(".sp-data-table").each(function() {
sortable = viewport().width > 640 && $(this).hasClass("sp-sortable-table");
sortable = sp_viewport().width > 640 && $(this).hasClass("sp-sortable-table");
paginated = $(this).hasClass("sp-paginated-table");
display_length = parseInt($(this).attr("data-sp-rows"));
if ( display_length == undefined || isNaN( display_length ) ) display_length = 10;