I would like to execute the below code when user scrolls to a certain position on the page; for instance 600px;
down (from the top). So detect 600px
down in PIXELS.
// $(document).ready(function() {
$(".slidedown").one('load', function () {
$(this).slideDown(200);
}).each(function() {
if(this.complete) $(this).trigger('load');
});
// });
This did not work:
$(document).scroll(function(){
if (document.scrollHeight > 600) {
$(".slidedown").one('load', function () {
$(this).slideDown(200);
}).each(function() {
if(this.complete) $(this).trigger('load');
});
}
});