From f4d9ae510d59c9bfd1a8233a96c66fbc263e858a Mon Sep 17 00:00:00 2001 From: Nick Tsai Date: Wed, 28 Nov 2018 10:00:14 +0800 Subject: [PATCH] Support jQuery 3 --- README.md | 2 +- dist/js/freeze-table.js | 4 ++-- docs/dist/js/freeze-table.js | 4 ++-- src/js/freeze-table.js | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3eed629..16bbb73 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ REQUIREMENTS ------------ This library requires the following: -- jQuery 1.11.0+ +- jQuery 1.11.0+ | 2.0+ | 3.0+ --- diff --git a/dist/js/freeze-table.js b/dist/js/freeze-table.js index 44a1324..e63369c 100644 --- a/dist/js/freeze-table.js +++ b/dist/js/freeze-table.js @@ -2,7 +2,7 @@ * RWD Table with freezing head and columns for jQuery * * @author Nick Tsai - * @version 1.0.0 + * @version 1.1.1 * @see https://github.com/yidas/jquery-freeze-table */ (function ($, window) { @@ -93,7 +93,7 @@ this.backgroundColor = options.backgroundColor || 'white'; // Get navbar height for keeping fixed navbar - this.fixedNavbarHeight = (fixedNavbar) ? $(fixedNavbar).outerHeight() : 0; + this.fixedNavbarHeight = (fixedNavbar) ? $(fixedNavbar).outerHeight() || 0 : 0; // Check existence if (this.isInit()) { diff --git a/docs/dist/js/freeze-table.js b/docs/dist/js/freeze-table.js index 32a376c..e63369c 100644 --- a/docs/dist/js/freeze-table.js +++ b/docs/dist/js/freeze-table.js @@ -2,7 +2,7 @@ * RWD Table with freezing head and columns for jQuery * * @author Nick Tsai - * @version 1.1.0 + * @version 1.1.1 * @see https://github.com/yidas/jquery-freeze-table */ (function ($, window) { @@ -93,7 +93,7 @@ this.backgroundColor = options.backgroundColor || 'white'; // Get navbar height for keeping fixed navbar - this.fixedNavbarHeight = (fixedNavbar) ? $(fixedNavbar).outerHeight() : 0; + this.fixedNavbarHeight = (fixedNavbar) ? $(fixedNavbar).outerHeight() || 0 : 0; // Check existence if (this.isInit()) { diff --git a/src/js/freeze-table.js b/src/js/freeze-table.js index 44a1324..e63369c 100644 --- a/src/js/freeze-table.js +++ b/src/js/freeze-table.js @@ -2,7 +2,7 @@ * RWD Table with freezing head and columns for jQuery * * @author Nick Tsai - * @version 1.0.0 + * @version 1.1.1 * @see https://github.com/yidas/jquery-freeze-table */ (function ($, window) { @@ -93,7 +93,7 @@ this.backgroundColor = options.backgroundColor || 'white'; // Get navbar height for keeping fixed navbar - this.fixedNavbarHeight = (fixedNavbar) ? $(fixedNavbar).outerHeight() : 0; + this.fixedNavbarHeight = (fixedNavbar) ? $(fixedNavbar).outerHeight() || 0 : 0; // Check existence if (this.isInit()) {