src/core/util/util.js
function() {
      var stickyProp;
      var testEl = angular.element('<div>');
      $document[0].body.appendChild(testEl[0]);

      var stickyProps = ['sticky', '-webkit-sticky'];
      for (var i = 0; i < stickyProps.length; ++i) {
        testEl.css({
          position: stickyProps[i],
          top: 0,
          'z-index': 2
        });

        if (testEl.css('position') == stickyProps[i]) {
          stickyProp = stickyProps[i];
          break;
        }
      }

      testEl.remove();

      return stickyProp;
    }
function() {
      var stickyProp;
      var testEl = angular.element('<div>');
      $document[0].body.appendChild(testEl[0]);

      var stickyProps = ['sticky', '-webkit-sticky'];
      for (var i = 0; i < stickyProps.length; ++i) {
        testEl.css({
          position: stickyProps[i],
          top: 0,
          'z-index': 2
        });

        if (testEl.css('position') == stickyProps[i]) {
          stickyProp = stickyProps[i];
          break;
        }
      }

      testEl.remove();

      return stickyProp;
    }
function ( ) { var stickyProp ; var testEl = angular . element ( '<div>' ) ; $document [ 0 ] . body . appendChild ( testEl [ 0 ] ) ; var stickyProps = [ 'sticky' , '-webkit-sticky' ] ; for ( var i = 0 ; i < stickyProps . length ; ++ i ) { testEl . css ( { position : stickyProps [ i ] , top : 0 , 'z-index' : 2 } ) ; if ( testEl . css ( 'position' ) == stickyProps [ i ] ) { stickyProp = stickyProps [ i ] ; break ; } } testEl . remove ( ) ; return stickyProp ; }
Checks if the current browser is natively supporting the `sticky` position.
@returns {string} supported sticky property name
Checks if the current browser is natively supporting the sticky position .