Skip to content

Instantly share code, notes, and snippets.

View jude-ui's full-sized avatar
πŸ˜€

jude-ui jude-ui

πŸ˜€
View GitHub Profile
@jude-ui
jude-ui / swiper μ˜΅μ…˜ κ°„λž΅ 버전.js
Created September 2, 2025 06:39
swiper μ˜΅μ…˜ κ°„λž΅ 버전
const $slide_wrapper = $('.slide_')
if ($slide_wrapper.length) {
$slide_wrapper.each(function (idx) {
const areaSlide = this
const slide = areaSlide.querySelector('.swiper')
const prevEl = areaSlide.querySelector('.btn_prev')
const nextEl = areaSlide.querySelector('.btn_next')
const pause = areaSlide.querySelector('.pause')
const play = areaSlide.querySelector('.play')
@jude-ui
jude-ui / ani_checkbox
Created June 11, 2025 00:46
μ²΄ν¬λ°•μŠ€ μ• λ‹ˆλ©”μ΄μ…˜ μƒ˜ν”Œ
<style>
:root{
--none: linear(0, 1);
--power1-in: linear( 0, 0.0039, 0.0156, 0.0352, 0.0625, 0.0977, 0.1407, 0.1914, 0.2499, 0.3164, 0.3906 62.5%, 0.5625, 0.7656, 1 );
--power1-out: linear( 0, 0.2342, 0.4374, 0.6093 37.49%, 0.6835, 0.7499, 0.8086, 0.8593, 0.9023, 0.9375, 0.9648, 0.9844, 0.9961, 1 );
--power1-in-out: linear( 0, 0.0027, 0.0106 7.29%, 0.0425, 0.0957, 0.1701 29.16%, 0.2477, 0.3401 41.23%, 0.5982 55.18%, 0.7044 61.56%, 0.7987, 0.875 75%, 0.9297, 0.9687, 0.9922, 1 );
--power2-in: linear( 0, 0.0014 11.11%, 0.0071 19.24%, 0.0188 26.6%, 0.037 33.33%, 0.0634 39.87%, 0.0978 46.07%, 0.1407 52.02%, 0.1925 57.74%, 0.2559 63.49%, 0.3295 69.07%, 0.4135 74.5%, 0.5083 79.81%, 0.6141 85%, 0.7312 90.09%, 1 );
--power2-out: linear( 0, 0.2688 9.91%, 0.3859 15%, 0.4917 20.19%, 0.5865 25.5%, 0.6705 30.93%, 0.7441 36.51%, 0.8075 42.26%, 0.8593 47.98%, 0.9022 53.93%, 0.9366 60.13%, 0.963 66.67%, 0.9812 73.4%, 0.9929 80.76%, 0.9986 88.89%, 1 );
--power2-in-out: linear( 0, 0.0036 9.62%, 0.0
@jude-ui
jude-ui / counterUp2-2.0.2.min.js
Created May 29, 2025 05:32
μΉ΄μš΄ν„° μ• λ‹ˆλ©”μ΄μ…˜ μ½”μ–΄ 라이브러리(jquery 의쑴 x)
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.counterUp=t():e.counterUp=t()}(self,(function(){return(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>n,divideNumbers:()=>r});const n=(e,t={})=>{const{action:n="start",duration:i=1e3,delay:u=16}=t;if("stop"===n)return void o(e);if(o(e),!/[0-9]/.test(e.innerHTML))return;const l=r(e.innerHTML,{duration:i||e.getAttribute("data-duration"),delay:u||e.getAttribute("data-delay")});e._countUpOrigInnerHTML=e.innerHTML,e.innerHTML=l[0]||"&nbsp;",e.style.visibility="visible";const c=function(){e.innerHTML=l.shift()||"&nbsp;",l.length?(c
@jude-ui
jude-ui / counter.js
Created May 29, 2025 05:32
counterUp2-2.0.2.min.js와 ν•¨κ»˜ μ‘°ν•©ν•΄μ„œ μΉ΄μš΄ν„° μ• λ‹ˆλ©”μ΄μ…˜ μ μš©ν•˜λŠ” 슀크립트
const counterUp = window.counterUp.default;
const counterCallback = (entries) => {
entries.forEach((entry) => {
if (entry.isIntersecting) {
counterUp(entry.target, {
duration: 1000,
delay: 16,
});
observer.unobserve(entry.target); // ν•œ 번 μ‹€ν–‰ ν›„ κ΄€μ°° 쀑지
}
@jude-ui
jude-ui / toggleMenu.js
Created May 27, 2025 06:51
μ‚¬μ΄λ“œλ©”λ‰΄ ν† κΈ€ 곡톡 둜직
// μ‚¬μ΄λ“œ 메뉴 ν† κΈ€ 곡톡 ν•¨μˆ˜
/**
*
* @param {Object} options - ν† κΈ€ λ™μž‘μ— ν•„μš”ν•œ μ˜΅μ…˜ 객체
* @param {JQuery} options.$allClassTargets - λͺ¨λ“ , 클래슀 νƒ€κ²Ÿ μš”μ†Œ (μ΄ˆκΈ°ν™” λŒ€μƒ)
* @param {JQuery} options.$currentClassTarget - ν˜„μž¬ 클릭된, 클래슀 νƒ€κ²Ÿ μš”μ†Œ
* @param {JQuery} options.$allSubMenus - λͺ¨λ“ , μ„œλΈŒ 메뉴 μš”μ†Œ (μŠ¬λΌμ΄λ“œ μ—…/λ‹€μš΄ λŒ€μƒ)
* @param {JQuery} options.$currentSubMenu - ν˜„μž¬ νƒ€κ²Ÿμ˜, μ„œλΈŒ 메뉴 μš”μ†Œ (μŠ¬λΌμ΄λ“œ μ—…/λ‹€μš΄ λŒ€μƒ)
* @param {string} [options.activeClass = 'active'] - ν™œμ„±ν™” μƒνƒœλ₯Ό λ‚˜νƒ€λ‚΄λŠ” 클래슀λͺ… (κΈ°λ³Έκ°’: 'active')
* @param {number} [options.duration = 200] - μŠ¬λΌμ΄λ“œ μ• λ‹ˆλ©”μ΄μ…˜ 지속 μ‹œκ°„ (λ°€λ¦¬μ΄ˆ, κΈ°λ³Έκ°’: 200)
@jude-ui
jude-ui / table_highlight.css
Created March 21, 2025 00:27
ν…Œμ΄λΈ” hover ν•˜μ΄λΌμ΄νŠΈ table highlight
.tbl td:hover{background-color: #28ae76}
.tbl td:has(~td:hover){color:#fff;background-color: #127d51} /* 쒌츑 td */
.tbl:has(td:nth-of-type(1):hover) tr:has(~ tr:hover) td:nth-of-type(1){color:#fff;background-color: #127d51} /* 컬럼 */햐
@jude-ui
jude-ui / scroll_check.js
Created January 12, 2025 23:24
js - 슀크둀(scroll) μ—…(up) λ‹€μš΄(down) 체크
let lastScrollTop = 0;
const delta = 20;
let didScroll = null;
$(window).scroll(function () {
if (!didScroll) {
didScroll = setTimeout(function () {
hasScrolled();
didScroll = null;
}, 250);
@jude-ui
jude-ui / btn_top.css
Last active January 3, 2025 06:15
λ§¨μœ„λ‘œ λ²„νŠΌ css
@keyframes topBtnAni {
0% {opacity: .5;transform: translate(-50%, -50%) scale(.8)}
100% {opacity: 0;transform: translate(-50%, -50%) scale(1.2)}
}
.footer .btn_top{
--circle-color: #000; /* 원 색상 */
--arrow-color: #fff; /* ν™”μ‚΄ν‘œ 색상 */
--outer-circle-opacity: .3; /* λ°”κΉ₯μͺ½ 원 투λͺ…도 */
--circle-gap: 0px; /* λ°”κΉ₯μͺ½ 원과 μ•ˆμͺ½ 원 사이 간격 */
--circle-gap-pc: 20px; /* λ°”κΉ₯μͺ½ 원과 μ•ˆμͺ½ 원 사이 간격(PC) */
@jude-ui
jude-ui / input_file.html
Last active November 3, 2024 23:35
인풋 파일 슀크립트
<div class="file_comm">
<input type="text" class="inp_comm" readonly>
<input type="file" id="inpFile">
<label for="inpFile" class="btn btn5">File 1</label>
</div>
<div class="file_comm">
<input type="text" class="inp_comm" readonly>
<input type="file" id="inpFile2">
<label for="inpFile2" class="btn btn5">File 2</label>
@jude-ui
jude-ui / element_scale.js
Last active September 1, 2024 23:49
js - νŠΉμ • μš”μ†Œ νŠΉμ • μ‹œμ λΆ€ν„° μŠ€μΌ€μΌ(scale) μ€„μ΄λŠ” κΈ°λŠ₯
/**
* 화면이 쀄어듀 λ•Œ νŠΉμ • μš”μ†Œκ°€ λΉ„μœ¨μ— 맞게 ν•¨κ»˜ μŠ€μΌ€μΌμ΄ 쀄어듀도둝 μ²˜λ¦¬ν•˜λŠ” κΈ°λŠ₯
* 이미지 νƒœκ·Έμ²˜λŸΌ λΉ„μœ¨λŒ€λ‘œ 쀄어듀기가 μ–΄λ €μš΄ μš”μ†Œμ— μ μš©ν•˜κΈ° μš©μ΄ν•¨(ex. ν…Œμ΄λΈ”λ‘œ μž‘μ„±λœ μš”μ†Œλ“€)
* @param {String} scaleTarget - μŠ€μΌ€μΌμ΄ 적용될 μš”μ†Œ
* @param {String} container - μŠ€μΌ€μΌμ΄ 적용될 μš”μ†Œλ₯Ό 감싸고 μžˆλŠ” μ»¨ν…Œμ΄λ„ˆ μš”μ†Œ
* @param {Number} breakpoint - μŠ€μΌ€μΌμ΄ 적용되기 μ‹œμž‘ν•˜λŠ” λΈŒλΌμš°μ € μ°½ λ„ˆλΉ„
* @param {Number} targetOriginWidth - μŠ€μΌ€μΌμ΄ 적용될 μš”μ†Œμ˜ μ›λž˜ λ„ˆλΉ„
*/
function adjustZoom(scaleTarget, container, breakpoint, targetOriginWidth) {
var screenWidth = $(window).width();