<style>
/*全てに適用*/
.ec-blockTopBtn{
display: none !important;
}
#pageTop{
margin: 50px 0 0 0;
background-color: #404040;
height: 60px;
}
.scroll{
margin: 10px 0 10px 48%;
}
/*ウィンドウ幅が767px以上の場合に適用*/
@media screen and (min-width: 767px) {
.ec-footerRole{
margin-top: 0 !important;
border-top: 0px !important;
}
}
/*ウィンドウ幅が最大767pxまでの場合に適用*/
@media screen and (max-width: 767px) {
.scroll{
margin: 10px 0 10px 43%;
}
.ec-footerRole{
margin-top: 5px !important;
}
</style>
<div id="pageTop">
<img src="/html/user_data/img/anchor.jpg" alt="" class="scroll">
</div>
<script>
//■page topボタン
$(function(){
var topBtn=$('#pageTop');
topBtn.hide();
//◇ボタンの表示設定
$(window).scroll(function(){
if($(this).scrollTop()>80){
//---- 画面を80pxスクロールしたら、ボタンを表示する
topBtn.fadeIn();
}else{
//---- 画面が80pxより上なら、ボタンを表示しない
topBtn.fadeOut();
}
});
// ◇ボタンをクリックしたら、スクロールして上に戻る
topBtn.click(function(){
$('body,html').animate({
scrollTop: 0},500);
return false;
});
});
</script>