-
Notifications
You must be signed in to change notification settings - Fork 159
Various Fixes #78
base: develop
Are you sure you want to change the base?
Various Fixes #78
Conversation
Update README.md
…Made the element selection more performant.
…tor fallback. Removed debugging calls. Added support for the Media Query 4 shim for more accurate touch support detection in chrome.
Added Media Query 4 support via this shim: |
ideal-image-slider.js
Outdated
@@ -431,6 +431,7 @@ var IdealImageSlider = (function() { | |||
beforeChange: function() {}, | |||
afterChange: function() {} | |||
}; | |||
this.length = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure length
is a very good name. What does it do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It allows one to test for the existence of empty Sliders, sliders with no images. Here is a usage example:
jQuery(document).ready(function ($) {
var homeSlider = new IdealImageSlider.Slider({
selector: '#home-slider',
height: 'auto',
effect: 'fade',
interval: 5000,
transitionDuration: 600,
maxHeight: 375
});
if( homeSlider.length ) {
homeSlider.addBulletNav();
homeSlider.start();
}
} | ||
|
||
//Add loading class | ||
_addClass(sliderEl, 'iis-loading'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to add loading classes, they should be in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future I'll adhere to a vary feature independent PR style. In the name of closing this PR, can we just keep the loading classes in for now?
|| !!('ontouchstart' in document.documentElement) | ||
|| !!window.ontouchstart | ||
|| (!!window.Touch && !!window.Touch.length) | ||
|| !!window.onmsgesturechange || (window.DocumentTouch && window.document instanceof window.DocumentTouch)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spacing for these conditions needs fixed.
|
||
//Remove loading class | ||
_removeClass(sliderEl, 'iis-loading'); | ||
_addClass(sliderEl, 'iis-loaded'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above. Loading classes should be in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future I'll adhere to a vary feature independent PR style. In the name of closing this PR, can we just keep the loading classes in for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made requested code changes and answered code questions.
} | ||
|
||
//Add loading class | ||
_addClass(sliderEl, 'iis-loading'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future I'll adhere to a vary feature independent PR style. In the name of closing this PR, can we just keep the loading classes in for now?
|
||
//Remove loading class | ||
_removeClass(sliderEl, 'iis-loading'); | ||
_addClass(sliderEl, 'iis-loaded'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future I'll adhere to a vary feature independent PR style. In the name of closing this PR, can we just keep the loading classes in for now?
Fixed slider initial size calulation for aspect ratio heights.
Fixes live NodeList bug in IE. As a side effect the element selection seems to now be more performant.