スクロールして、画面に指定の要素が見えたら特定の処理を実行するスクリプトです。
script
$(window).on('scroll' , function(){
if ($("要素名").is(":hidden")) {
//見えてなかったら
} else {
//見えてたら
}
});
More than 5 years have passed since last update.
スクロールして、画面に指定の要素が見えたら特定の処理を実行するスクリプトです。
$(window).on('scroll' , function(){
if ($("要素名").is(":hidden")) {
//見えてなかったら
} else {
//見えてたら
}
});
Register as a new user and use Qiita more conveniently