My Name is Kay....

DIY , 먹방 , 개발 , 육아 , 여행 좋아합니다.
AdBlock 사용시 화면이 정상적으로 노출되지 않습니다.
포스팅 관련 문의 및 개발 문의는 Email : wkzkfmxksi@gmail.com

추가 포스팅이 이뤄지지 않는 블로그입니다. 문의는 wkzkfmxksi@gmail.com 으로 연락주세요.
kay
조회 수 18965 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

원본 Url : http://www.xpressengine.com/?mid=download&package_srl=21842038

Test Url : http://www.uhoon.co.kr/test/1183.html


스크롤이 내려가면 스크롤탑 컨트롤이 나타나서 클릭시 페이지 상단으로 올라갑니다..


<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>scrolltop control </title>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<style type="text/css">
	h1 { font-size: 34px; line-height: 1.2; margin: 0.3em 0 10px; }
	#scrolltotop{position:fixed;bottom:0px;right:0px}#scrolltotop
	span{width:48px;height:48px;display:block;background:url("/test/1183/top.png") top no-repeat;margin:0px
	15px 10px 0;border-radius:3px;-webkit-transition:all 0.2s ease-out;-moz-transition:all 0.2s ease-out;-o-transition:all 0.2s ease-out;-ms-transition:all 0.2s ease-out;transition:all 0.2s ease-out}#scrolltotop a:hover
	span{background:url("/test/1183/top.png") bottom no-repeat}
</style>

<script type="text/javascript">
<!--
	jQuery(function($){
	$('#scrolltotop').hide();
	$(function () {
		$(window).scroll(function () {
			if ($(this).scrollTop() > 100) {
				$('#scrolltotop').fadeIn();
			} else {
				$('#scrolltotop').fadeOut();
			}
		});
		$('#scrolltotop a').click(function () {
			$('body,html').animate({
				scrollTop: 0
			}, 1000);
			return false;
		});
	});
});
//-->
</script>
</head>
<body>
<div id="scrolltotop" style="display: block;"><a href="#top"><span></span></a></div>
<div style="height:3200px;">a</div>
</body>
</html>


관련 게시글



?

  1. woothemes FlexSlider - 슬라이더

    Date2014.09.16 CategoryUI Bykay Views286945
    Read More
  2. jQuery Plugin For Auto Resizing iFrame - iFrame Resizer

    Date2014.03.10 CategoryPlugIn Bykay Views105652
    Read More
  3. SelectBox Option 값 초기화 및 수정 삭제

    Date2013.03.02 CategoryUI Bykay Views36666
    Read More
  4. fancyBox - 레이어팝업 (추천)

    Date2013.04.16 CategoryPlugIn Bykay Views32412
    Read More
  5. 에러 리포팅 , Ajax 디버깅 ( JS , ASP ) - 오류메시지 확인하기

    Date2013.03.08 Categoryetc Bykay Views30638
    Read More
  6. animate - 각종 애니메이션 효과

    Date2013.04.11 CategoryUI Bykay Views26330
    Read More
  7. CheckBox 값 읽어오기

    Date2013.05.06 CategoryA to Z Bykay Views25268
    Read More
  8. Table에 동적 Tr 추가/삭제 하기

    Date2014.02.09 Categoryetc Bykay Views21280
    Read More
  9. jquery-syaku.rolling 상하좌우 롤링 ( 자동롤링 , 버튼 )

    Date2014.02.09 CategoryPlugIn Bykay Views20164
    Read More
  10. 스크롤 탑 컨트롤 - scrolltop control

    Date2013.05.29 CategoryUI Bykay Views18965
    Read More
  11. makisu - 메뉴 접기(?)

    Date2013.04.16 CategoryPlugIn Bykay Views18446
    Read More
  12. tiptip - 툴팁

    Date2013.04.14 CategoryPlugIn Bykay Views17886
    Read More
  13. jQuery Org Chart - 조직도 그리기

    Date2014.09.01 CategoryPlugIn Bykay Views16616
    Read More
  14. 자동 롤링 배너 Jquery

    Date2013.08.07 CategoryPlugIn Bykay Views13883
    Read More
  15. Star Rating Plugin - jQuery 별점 주기

    Date2014.05.01 CategoryPlugIn Bykay Views13225
    Read More
  16. Smooth Scroll - 스크롤 이동 ( 속도 , 위치 )

    Date2013.04.06 CategoryPlugIn Bykay Views12680
    Read More
  17. poshytip - 툴팁

    Date2013.04.15 CategoryPlugIn Bykay Views11803
    Read More
  18. 동적으로 추가된 객체에 datepicker() 적용하기

    Date2013.11.06 CategoryUI Bykay Views10142
    Read More
  19. 한글/영어 byte 체크해서 자르기

    Date2013.11.30 Categoryetc Bykay Views9704
    Read More
  20. select Box option ( 초기화,추가,삭제 )

    Date2013.04.03 CategoryUI Bykay Views9533
    Read More
Board Pagination Prev 1 2 3 Next
/ 3