An open API service indexing awesome lists of open source software.

https://github.com/postor/onshown

a jquery plugin that can trigger when an element is shown in view port
https://github.com/postor/onshown

Last synced: 2 months ago
JSON representation

a jquery plugin that can trigger when an element is shown in view port

Awesome Lists containing this project

README

        

onShown
=======

a jquery plugin that can trigger when an element is shown in view port

usage
========

### html

#a {
background: #eee;
padding-bottom: 1000px;
}
#b,#c {
background: red;
height: 200px;
}







### js



var show = $('div').onShown({
callback:function(el){
console.log(el);
}
});

params
========

### partShown
when to trigger, when part of element enters(when set to true) or fully entered(set to false)

### callback
when trigger it callback and pass element as paramater

### bind
a function that bind to an event, default is binded to $(window).scroll