Skip to content

Commit

Permalink
fix jQuery 3+ warnings (#471)
Browse files Browse the repository at this point in the history
* fix jQuery 3+ warnings

* release 2.2.2
  • Loading branch information
Kirill Shnurov authored Aug 17, 2021
1 parent 44910d6 commit 138f242
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 31 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 2.2.2
Fix jQuery 3+ warnings

### 2.2.1
Fix typescript defs

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ npm install floatthead
bower install floatThead
```
#### Download code
[Latest Release (zip)](https://github.com/mkoryak/floatThead/archive/2.2.1.zip)
[Latest Release (zip)](https://github.com/mkoryak/floatThead/archive/2.2.2.zip)

#### Via CDN
[https://cdnjs.com/libraries/floatthead/](https://cdnjs.com/libraries/floatthead/)
Expand Down
26 changes: 13 additions & 13 deletions dist/jquery.floatThead.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @preserve jQuery.floatThead 2.2.1 - https://mkoryak.github.io/floatThead/ - Copyright (c) 2012 - 2020 Misha Koryak **/
/** @preserve jQuery.floatThead 2.2.2 - https://mkoryak.github.io/floatThead/ - Copyright (c) 2012 - 2021 Misha Koryak **/
// @license MIT

/* @author Misha Koryak
Expand Down Expand Up @@ -120,11 +120,11 @@
//safari 7 (and perhaps others) reports table width to be parent container's width if max-width is set on table. see: https://github.com/mkoryak/floatThead/issues/108
var isTableWidthBug = function(){
if(isWebkit) {
var $test = $('<div>').css('width', 0).append(
var $test = $('<div>').css('width', '0').append(
$('<table>').css('max-width', '100%').append(
$('<tr>').append(
$('<th>').append(
$('<div>').css('min-width', 100).text('X')
$('<div>').css('min-width', '100px').text('X')
)
)
)
Expand Down Expand Up @@ -373,8 +373,8 @@

var $fthGrp = $('<fthfoot>').css({
'display': 'table-footer-group',
'border-spacing': 0,
'height': 0,
'border-spacing': '0',
'height': '0',
'border-collapse': 'collapse',
'visibility': 'hidden'
});
Expand All @@ -393,8 +393,8 @@
var colSelector = existingColGroup ? "col:visible" : "col";
var $fthRow = $('<fthtr>').css({ //created unstyled elements (used for sizing the table because chrome can't read <col> width)
'display': 'table-row',
'border-spacing': 0,
'height': 0,
'border-spacing': '0',
'height': '0',
'border-collapse': 'collapse'
});
var $floatContainer = $('<div>').css(opts.floatContainerCss).attr('aria-hidden', 'true');
Expand Down Expand Up @@ -436,7 +436,7 @@
floatTableHidden = true;
}

$floatTable.addClass(opts.floatTableClass).css({'margin': 0, 'border-bottom-width': 0}); //must have no margins or you won't be able to click on things under floating table
$floatTable.addClass(opts.floatTableClass).css({'margin': '0', 'border-bottom-width': '0'}); //must have no margins or you won't be able to click on things under floating table

if(useAbsolutePositioning){
var makeRelative = function($container, alwaysWrap){
Expand Down Expand Up @@ -471,8 +471,8 @@

$floatContainer.css({
position: useAbsolutePositioning ? 'absolute' : 'fixed',
marginTop: 0,
top: useAbsolutePositioning ? 0 : 'auto',
marginTop: '0',
top: useAbsolutePositioning ? '0' : 'auto',
zIndex: opts.zIndex,
willChange: 'transform'
});
Expand Down Expand Up @@ -553,7 +553,7 @@
psuedo.push(
$('<fthtd>').css({
'display': 'table-cell',
'height': 0,
'height': '0',
'width': 'auto'
})
);
Expand Down Expand Up @@ -871,8 +871,8 @@
'-ms-transform' : transform,
'-o-transform' : transform,
'transform' : transform,
'top': 0,
'left': 0,
'top': '0',
'left': '0',
};
$floatContainer.css(cssObj);
}
Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.floatThead.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "floatthead",
"version": "2.2.1",
"version": "2.2.2",
"description": "fixed table header plugin that works",
"main": "dist/jquery.floatThead.min.js",
"types": "dist/jquery.floatThead.d.ts",
Expand Down
26 changes: 13 additions & 13 deletions src/jquery.floatThead.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @preserve jQuery.floatThead 2.2.1 - https://mkoryak.github.io/floatThead/ - Copyright (c) 2012 - 2020 Misha Koryak **/
/** @preserve jQuery.floatThead 2.2.2 - https://mkoryak.github.io/floatThead/ - Copyright (c) 2012 - 2021 Misha Koryak **/
// @license MIT

/* @author Misha Koryak
Expand Down Expand Up @@ -120,11 +120,11 @@
//safari 7 (and perhaps others) reports table width to be parent container's width if max-width is set on table. see: https://github.com/mkoryak/floatThead/issues/108
var isTableWidthBug = function(){
if(isWebkit) {
var $test = $('<div>').css('width', 0).append(
var $test = $('<div>').css('width', '0').append(
$('<table>').css('max-width', '100%').append(
$('<tr>').append(
$('<th>').append(
$('<div>').css('min-width', 100).text('X')
$('<div>').css('min-width', '100px').text('X')
)
)
)
Expand Down Expand Up @@ -373,8 +373,8 @@

var $fthGrp = $('<fthfoot>').css({
'display': 'table-footer-group',
'border-spacing': 0,
'height': 0,
'border-spacing': '0',
'height': '0',
'border-collapse': 'collapse',
'visibility': 'hidden'
});
Expand All @@ -393,8 +393,8 @@
var colSelector = existingColGroup ? "col:visible" : "col";
var $fthRow = $('<fthtr>').css({ //created unstyled elements (used for sizing the table because chrome can't read <col> width)
'display': 'table-row',
'border-spacing': 0,
'height': 0,
'border-spacing': '0',
'height': '0',
'border-collapse': 'collapse'
});
var $floatContainer = $('<div>').css(opts.floatContainerCss).attr('aria-hidden', 'true');
Expand Down Expand Up @@ -436,7 +436,7 @@
floatTableHidden = true;
}

$floatTable.addClass(opts.floatTableClass).css({'margin': 0, 'border-bottom-width': 0}); //must have no margins or you won't be able to click on things under floating table
$floatTable.addClass(opts.floatTableClass).css({'margin': '0', 'border-bottom-width': '0'}); //must have no margins or you won't be able to click on things under floating table

if(useAbsolutePositioning){
var makeRelative = function($container, alwaysWrap){
Expand Down Expand Up @@ -471,8 +471,8 @@

$floatContainer.css({
position: useAbsolutePositioning ? 'absolute' : 'fixed',
marginTop: 0,
top: useAbsolutePositioning ? 0 : 'auto',
marginTop: '0',
top: useAbsolutePositioning ? '0' : 'auto',
zIndex: opts.zIndex,
willChange: 'transform'
});
Expand Down Expand Up @@ -553,7 +553,7 @@
psuedo.push(
$('<fthtd>').css({
'display': 'table-cell',
'height': 0,
'height': '0',
'width': 'auto'
})
);
Expand Down Expand Up @@ -871,8 +871,8 @@
'-ms-transform' : transform,
'-o-transform' : transform,
'transform' : transform,
'top': 0,
'left': 0,
'top': '0',
'left': '0',
};
$floatContainer.css(cssObj);
}
Expand Down

0 comments on commit 138f242

Please sign in to comment.