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.
私は iframe を使用しています。(iframe 内のリンクをクリックすると) ブラウザー ウィンドウ全体を一番上にスクロールしたいと思います。私はこれを行うことができますか?
ページ コンテナーと iframe のいずれかを制御します。
var contents = $('iframe').contents(), element = contents.find('#click'); element.click(function() { $('html, body').animate({ scrollTop: 0 }, 500); });