Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/wwwisc 87 #4007

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
slick
-------

_the last carousel you'll ever need_

[1]: <https://github.com/kenwheeler/slick>

_the last carousel you'll ever need_

Modified to work with version 3.4 of jQuery by changing the following:
* Changing all values passed through `.css()` to strings - https://github.com/jquery/jquery-migrate/blob/master/warnings.md#jqmigrate-use-of-number-typed-values-is-deprecated-in-jqueryfncss
* Removing the deprecated `jQuery.type` method - https://api.jquery.com/jQuery.type/

#### Demo

Expand Down Expand Up @@ -281,7 +286,7 @@ Slick works on IE8+ in addition to other modern browsers such as Chrome, Firefox

#### Dependencies

jQuery 1.7
jQuery 3.4

#### License

Expand Down
5 changes: 5 additions & 0 deletions 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
Expand Up @@ -45,6 +45,6 @@
"url": "https://github.com/kenwheeler/slick/issues"
},
"peerDependencies": {
"jquery": ">=1.8.0"
"jquery": ">=3.4"
}
}
46 changes: 23 additions & 23 deletions slick/slick.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@

_.$list = _.$slideTrack.wrap(
'<div class="slick-list"/>').parent();
_.$slideTrack.css('opacity', 0);
_.$slideTrack.css('opacity', '0');

if (_.options.centerMode === true || _.options.swipeToSlide === true) {
_.options.slidesToScroll = 1;
Expand Down Expand Up @@ -937,7 +937,7 @@
if (_.cssTransitions === false) {

_.$slides.eq(slideIndex).css({
zIndex: _.options.zIndex
zIndex: _.options.zIndex.toString()
});

_.$slides.eq(slideIndex).animate({
Expand All @@ -950,7 +950,7 @@

_.$slides.eq(slideIndex).css({
opacity: 1,
zIndex: _.options.zIndex
zIndex: _.options.zIndex.toString()
});

if (callback) {
Expand All @@ -973,17 +973,17 @@
if (_.cssTransitions === false) {

_.$slides.eq(slideIndex).animate({
opacity: 0,
zIndex: _.options.zIndex - 2
opacity: '0',
zIndex: (_.options.zIndex - 2).toString()
}, _.options.speed, _.options.easing);

} else {

_.applyTransition(slideIndex);

_.$slides.eq(slideIndex).css({
opacity: 0,
zIndex: _.options.zIndex - 2
opacity: '0',
zIndex: (_.options.zIndex - 2).toString()
});

}
Expand Down Expand Up @@ -1653,7 +1653,7 @@
_.setPosition();

_.$slideTrack.css({
opacity: 1
opacity: '1'
});

_.$slider.removeClass('slick-loading');
Expand Down Expand Up @@ -1887,7 +1887,7 @@
var _ = this, breakpoint, currentBreakpoint, l,
responsiveSettings = _.options.responsive || null;

if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) {
if ( Array.isArray(responsiveSettings) && responsiveSettings.length ) {

_.respondTo = _.options.respondTo || 'window';

Expand Down Expand Up @@ -2099,25 +2099,25 @@
if (_.options.rtl === true) {
$(element).css({
position: 'relative',
right: targetLeft,
top: 0,
zIndex: _.options.zIndex - 2,
opacity: 0
right: targetLeft.toString(),
top: '0',
zIndex: (_.options.zIndex - 2).toString(),
opacity: '0'
});
} else {
$(element).css({
position: 'relative',
left: targetLeft,
top: 0,
zIndex: _.options.zIndex - 2,
opacity: 0
left: targetLeft.toString(),
top: '0',
zIndex: (_.options.zIndex - 2).toString(),
opacity: '0'
});
}
});

_.$slides.eq(_.currentSlide).css({
zIndex: _.options.zIndex - 1,
opacity: 1
zIndex: (_.options.zIndex - 1).toString(),
opacity: '1'
});

};
Expand All @@ -2128,7 +2128,7 @@

if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
_.$list.css('height', targetHeight);
_.$list.css('height', targetHeight.toString());
}

};
Expand All @@ -2151,13 +2151,13 @@

var _ = this, l, item, option, value, refresh = false, type;

if( $.type( arguments[0] ) === 'object' ) {
if( typeof arguments[0] === 'object' && arguments[0] !== null ) {

option = arguments[0];
refresh = arguments[1];
type = 'multiple';

} else if ( $.type( arguments[0] ) === 'string' ) {
} else if ( typeof arguments[0] === 'string' ) {

option = arguments[0];
value = arguments[1];
Expand Down Expand Up @@ -2193,7 +2193,7 @@

for ( item in value ) {

if( $.type( _.options.responsive ) !== 'array' ) {
if( !Array.isArray( _.options.responsive ) ) {

_.options.responsive = [ value[item] ];

Expand Down