Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

css-positionsticky.js 468B

12345678910111213
  1. // Sticky positioning - constrains an element to be positioned inside the
  2. // intersection of its container box, and the viewport.
  3. Modernizr.addTest('csspositionsticky', function () {
  4. var prop = 'position:';
  5. var value = 'sticky';
  6. var el = document.createElement('modernizr');
  7. var mStyle = el.style;
  8. mStyle.cssText = prop + Modernizr._prefixes.join(value + ';' + prop).slice(0, -prop.length);
  9. return mStyle.position.indexOf(value) !== -1;
  10. });