Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のコードを使用して div を更新していますが、ページを更新するたびにレイアウトが損なわれ、その理由がわかりません..
var auto_refresh = setInterval( function() { $('#loaddiv').fadeOut('slow').load('loadmore.php').fadeIn("slow"); }, 2000);
リロード後
ページ全体を要素に挿入しているため、セレクターをloadメソッドに渡すことができます。
load
var auto_refresh = setInterval(function() { $('#loaddiv').fadeOut('slow').load('loadmore.php #target', function(){ $(this).fadeIn("slow") }); }, 2000);