0
this fiddleでは、一度スクロールすると表示されますが、ビューポートから外に出ると消えます。ビューポートに画像が表示され、ビューポートに表示されないと消えます
SCRIPT
$(document).ready(function() {
/* Every time the window is scrolled ... */
$(window).scroll(function(){
/* Check the location of each desired element */
$('.hideme').each(function(i){
var bottom_of_object = $(this).position().top + $(this).outerHeight();
var bottom_of_window = $(window).scrollTop() + $(window).height();
/* If the object is completely visible in the window, fade it it */
if(bottom_of_window > bottom_of_object){
$(this).animate({'opacity':'1'},1500);
}
});
});
})。
this **オフセットトップ+高さ
はい、そうです。 – Gabriel
私はまだそれを理解できないようですが、あなたはそれを詳しく教えてください。してください –