* Add classes to the Sequence container that allow for styling based on * feature support. * * @param {HTMLObject} $el - The element to add the classes to * @param {Object} Modernizr - Sequence's instance of Modernizr * @api private
($el, Modernizr)
| 647 | * @api private |
| 648 | */ |
| 649 | function addFeatureSupportClasses($el, Modernizr) { |
| 650 | |
| 651 | // TODO: Add support for all features used by Sequence and only manipulate |
| 652 | // the DOM once. Currently this function just adds a class for the touch |
| 653 | // feature. Probably best just to copy how Modernizr does it to implement |
| 654 | // full list of features |
| 655 | |
| 656 | var prefix = "seq-", |
| 657 | support = "no-touch"; |
| 658 | |
| 659 | if (Modernizr.touch === true) { |
| 660 | support = "touch"; |
| 661 | } |
| 662 | |
| 663 | addClass($el, prefix + support); |
| 664 | } |
| 665 | |
| 666 | /* --- PUBLIC PROPERTIES/METHODS --- */ |
| 667 |
no test coverage detected
searching dependent graphs…