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: |
| beforeChange: function() {}, | ||
| afterChange: function() {} | ||
| }; | ||
| this.length = 0; |
There was a problem hiding this comment.
I'm not sure length is a very good name. What does it do?
There was a problem hiding this comment.
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.
If you want to add loading classes, they should be in a separate PR.
There was a problem hiding this comment.
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.
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.
Same as above. Loading classes should be in a separate PR.
There was a problem hiding this comment.
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?
msigley
left a comment
There was a problem hiding this comment.
Made requested code changes and answered code questions.
| } | ||
|
|
||
| //Add loading class | ||
| _addClass(sliderEl, 'iis-loading'); |
There was a problem hiding this comment.
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.
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.