Notice
Recent Posts
Recent Comments
Link
250x250
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- XEIcon
- googleicon
- owlcarousel
- vscode git clone
- package.json
- maxwidth
- legacy-peer
- 의존성문제
- 단어단위로떨어지기
- fontawesome
- 웹아이콘
- react npm install
- 동적객체
- npm start
- 글자들여쓰기
- 정적객체
- npm install 문제
- node설치
- Git clone
- node 오류
- minwidth
- 이미지반응형
- slickslider
- window 정책변경
- 플러그인
- MediaQuery
- 아이콘사용법
- 그누보드반응형
- git lab clone
- npm install
Archives
- Today
- Total
어쩌다 알게 된 ƪ(•̃͡•̃͡ ƪ
스크롤을 이용한 top버튼 본문
728x90

<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title> Top버튼 스크롤하기~ </title>
</head>
<body>
<button type="button" name="button" id="topBtn"></button>
또는
<a id="topbtn"></a>
</body>
</html>
$(function(){
//탑버튼
$("#topBtn").click(function(){
$("html, body").animate({
scrollTop: 0
}, 500);
});
});
728x90
'자바스크립트 > 🟡 Jquery' 카테고리의 다른 글
| click과 on click 의 차이점?? (4) | 2021.10.08 |
|---|---|
| ( jquery ) 개념 정리 1 (3) | 2021.06.13 |
Comments
