2.0.1 • Published 4 years ago

newexposure v2.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

newExposure

  1. introduction:

    The newExposure is a tool for collecting exposure info in web page when user scroll the page.

    It can be used by passing a request URL or a callback function, and can be setted as doing once action or more.

  2. usage:

    step 1: include the js file in your web page

    with npm:

    npm install --save newExposure

    then:

    import newExposure from 'newexposure'

    or.

    download in your local project manually

    then:

    <script src="js/newExposure.js"></script>

    step 2: call the following method when you need to add exposure:

    newExposure.pushListeningEle(ele, action, canRepeat)

    eg.

    newExposure.pushListeningEle(document.querySelector('#exp'), 'https://xxx.com/1.gif', false);

    or.

    newExposure.pushListeningEle(document.querySelector('#exp'), () => {
      console.log('showing...');
    }, true);
2.0.1

4 years ago

2.0.0

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago