javascript(15)
-
mouseenter, mouseleave / on
$(document).on({ mouseenter: function () { $(this).addClass('border-primary'); $(this).addClass('border-2'); $(this).addClass('fw-bold'); }, mouseleave: function () { $(this).removeClass('border-primary'); $(this).removeClass('border-2'); $(this).removeClass('fw-bold'); } }, '.sideNavDiv');
2022.01.01 -
최대값, 최소값
Math.max.apply(null, 배열); // 최대값 Math.min.apply(null, 배열); //최소값 var test = [0, 77, 33, 11, 99, 88, 55]; Math.max.apply(null, test); //결과값은 99 Math.min.apply(null, test); //결과값은 0
2021.12.30 -
창 크기, 모니터 크기
window.innerWidth // 창 너비 window.innerHeight // 창 높이 screen.width // 화면(모니터 해상도)의 너비 screen.availWidth // 모니터 화면의 작업 표시줄을 제외한 너비 screen.height // 화면(모니터 해상도)의 높이 screen.availHeight // 모니터 화면의 작업 표시줄을 제외한 높이
2021.12.30 -
ajax 이후 hover 이벤트
$(document).on({ mouseenter: function () { $(this).addClass('border-primary'); $(this).addClass('border-2'); $(this).addClass('fw-bold'); }, mouseleave: function () { $(this).removeClass('border-primary'); $(this).removeClass('border-2'); $(this).removeClass('fw-bold'); } }, '.sideNavDiv');
2021.12.14 -
ready & onload
https://hahahoho5915.tistory.com/28 jQuery .ready() vs .onload() 특징 및 차이 개요 > jQuery를 이용한 뷰단 event 함수 구현 중 비슷하지만 다른 두 jQuery 함수에 대한 궁금증 // 비슷하지만 다른 2개의 소스의 차이점이 무엇인가?? $(document).ready(function(){ alert('hi.. hahahoho5915.tistory.com
2021.12.12 -
[JS] 현재 날짜, 시간 포맷 (YYYY-MM-DD hh:mm:ss)
https://gurtn.tistory.com/65 [JS] 현재 날짜, 시간 포맷 (YYYY-MM-DD hh:mm:ss) 첫 번째 코드 (YYYY-MM-DD hh:mm:ss) new Date(+new Date() + 3240 * 10000).toISOString().replace("T", " ").replace(/\..*/, ''); // 2021-08-05 09:51:31 해당 코드는 3240 * 10000 이란 수식만 기억하면 쉽게.. gurtn.tistory.com
2021.11.25