Nelson Tan Nelson Tan - 11 months ago 48
HTML Question

Scrollreveal.js not working on modal

I tried using scrollreveal.js on

modal
. But i'm having a problem revealing the content when modal is scroll. I've tried changing the viewport(see the code below both not working) to
myModal
but still not working. Thanks for your help. Here my fiddle and code.

window.sr = new ScrollReveal({
viewport: $('#myModal');
});

window.sr = new ScrollReveal({
viewport: document.getElementById('myModal');
});


heres the fiddle: https://jsfiddle.net/nwxLq2zg/7/

Answer Source

you can check this fiddle mate https://jsfiddle.net/nwxLq2zg/8/

window.sr = ScrollReveal();
sr.reveal('.foo', { container: '.modal-body' });