Run callback to detect an element to have been displayed by the scroll.
- Skip
- Ahead
- Repeat
- Standby
$.visibilitytrigger
.open({
ns: '.img.primary',
trigger: '#primary img.delay',
handler: function () {
this.src = this.getAttribute('data-origin');
},
rush: 3,
ahead: .1,
skip: true
})
.open({
ns: '.img.secondary',
trigger: '#secondary img.delay',
handler: function () {
this.src = this.getAttribute('data-origin');
},
rush: 3,
ahead: .1,
skip: true
})
.open({
ns: '.sh.primary',
trigger: '#primary pre.sh.delay',
handler: function () {
SyntaxHighlighter.highlight(SyntaxHighlighter.defaults, this);
},
rush: 3,
ahead: .1,
skip: true,
step: 0
})
.disable().enable('img').vtrigger();
// any process
$.vt.enable().vtrigger('primary').vtrigger();
Sorry, there are only Japanese documents. I welcome translation.
Support major browsers.
- IE6+
- Chrome
- Firefox
- Safari
- Opera
- Android
- iOS
- v1.4.2
- v1.7.2
- v1.11.1
- v2.1.1
MIT License