scrollEvents 1.1.3 demo

by Ryan McQuen

HTML

<script src="https://cdn.rawgit.com/ryanpcmcquen/scrollEvents/ed99a21fba898faa6b6f9ff814be09ca45aac735/scrollEvents.min.js"></script>
<div class="container">
  <div class="example">This will change on scroll ...</div>
</div>

CSS

.container {
  height: 5000px;
}

.example {
  position: fixed;
}

.example--not_scrolled {
  color: #00cc63;
}

.example--scrolled {
  color: #db0071;
}

JavaScript

scrollEvents(".example").changeText("Back at the top!", "You have scrolled!").changeClass("example--not_scrolled", "example--scrolled");