scrolling lock

by TokenEx Support

HTML

<div style="position: fixed; height:45px">
<div class="tokenex-loader ">
  <div class="tokenex-loader-knob">
  </div>
</div> 
</div>

<div style="height: 5000px;">

</div>

CSS

.tokenex-loader {
    position: relative;
    height: 98px;
    width: 75px;
    background: url(https://test-my.tokenex.com/images/Lock-base-18.png);
        background-size: auto auto;
    background-size: cover;
}
.tokenex-loader-knob {
    position: absolute;
    content: "";
    background: url(https://test-my.tokenex.com/images/Lock-knob-18.png);
        background-size: auto auto;
    background-size: cover;
    top: 27px;
    right: 9px;
    width: 57px;
    height: 57px;
}

JavaScript

$(window).scroll(function() {
var scrollAmount = $(window).scrollTop() / 100 ;
$('.tokenex-loader-knob').css({ transform: 'rotate(' + scrollAmount + 'rad)' })
});