BVB Source Codes

in-view Show main.js Source code

Return Download in-view: download main.js Source code - Download in-view Source code - Type:.js
  1. import inView from '../../../src';
  2.  
  3. let count = 200;
  4. let field = document.querySelector('.field');
  5.  
  6. const createDot = () => {
  7.     let dot = document.createElement('div');
  8.     dot.className = 'dot';
  9.     dot.style.top = `${(Math.random() * 100)}%`;
  10.     dot.style.left = `${(Math.random() * 100)}%`;
  11.     return dot;
  12. }
  13.  
  14. while (count--) {
  15.     field.appendChild(createDot());
  16. }
  17.  
  18. inView.offset(50);
  19.  
  20. inView('.dot')
  21.     .on('enter', el =>
  22.         el.classList.add('in-view'))
  23.     .on('exit', el =>
  24.         el.classList.remove('in-view'));
  25.  
downloadmain.js Source code - Download in-view Source code
Related Source Codes/Software:
magictools - 2017-01-09
elm-compiler - Compiler for Elm, a functional language for reliab... 2017-01-09
Twig - Twig, the flexible, fast, and secure template lang... 2017-01-09
android-testing - A collection of samples demonstrating different fr... 2017-01-09
lib-flexible - Scalable layout scheme 2017-01-09
sinon - Test spies, stubs and mocks for JavaScript. ... 2017-01-09
docker-gitlab - Dockerized GitLab http://www.da... 2017-01-09
Side-Menu.Android - Side menu with some categories to choose. ... 2017-01-09
libsodium - A modern and easy-to-use crypto library. 2017-01-09
prerender - Node server that uses phantomjs to render a javasc... 2017-01-09
GroundControl - Remote configuration for iOS 2017-04-30
browser-diet - 2017-04-30
react-music - Make beats with React! http... 2017-04-30
java-code-styles - IntelliJ IDEA code style settings for Square's Jav... 2017-04-30
swing - A swipeable cards interface. The swipe-left/swipe-... 2017-04-30
qTip2 - qTip2 - Pretty powerful tooltips ... 2017-04-30
jo - JSON output from a shell 2017-04-30
Fluidbox - Replicating and improving the lightbox module seen... 2017-04-30
boto3 - AWS SDK for Python http://a... 2017-04-30
PreloadJS - PreloadJS makes preloading assets & getting ag... 2017-04-29

 Back to top