Sha256: c8bda8d82c6a3757eb39f01e278137be949c4492e3d59f3083973a99e72b60a6

Contents?: true

Size: 305 Bytes

Versions: 2

Compression:

Stored size: 305 Bytes

Contents

/**
 * Created by Charlie on 17/05/2017.
 */
function lockScrollAndGetScrollTop() {
  $('body').css('top', ( $(document).scrollTop()) + 'px')
      .addClass('no-scroll');
}


function unlockScroll() {
  $('body').css('top', -(document.documentElement.scrollTop) + 'px')
      .removeClass('no-scroll');
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tmatt_cms-0.1.9 lib/generators/tmatt_cms/templates/js/utils/body_util.js
tmatt_cms-0.1.8 lib/generators/tmatt_cms/templates/js/utils/body_util.js