Skip to content

eniumeng/newExposure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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);

About

a tool for exposure info collecting

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published