js (62) js 2022. 8. 8. 09:52 [js]마우스 휠 감지 See the Pen 마우스 휠 감지 by sangmok-ye (@sangmok-ye) on CodePen. on메서드를 쓰는 이유 : 파이어폭스 호환 올릴 경우 120, 내릴 경우 -120 js 2022. 7. 21. 15:24 [js]ajax 기초 공부 ↓ ajax 기존버전(구버전) $(".click").click(function(){ $.ajax({ url:"sub.html", success:function(data){ $("#container").html($(data).find("li")) } }); }) // 여기서 data는 url링크와 동일하게 인식됨 async : ture or false (defalut : ture) // ture 비동기 , flase 동기 timeout : 밀리세컨드 // timeout 설정으로 해당 시간동안 통신이 되지않을 경우 통신 에러발생 콜백 동작 순서 →성공 success > complete > done > always →실패 error > complete > fail > always 참고 https://api.j.. js 2022. 7. 12. 09:54 [js]디바운싱과 쓰로틀 debounce Throttle 쓰로틀링 참고 https://webclub.tistory.com/607 // 디바운스 function Event(){ // 스크롤 이벤트 실행 함수 코드 } let timer; $(window).scroll(function () { if(timer){ clearTimeout(timer) } timer = setTimeout(()=>{ Event() },500) }) //쓰로틀 function Event(){ 실행될 함수 코드 } let timer; $(window).scroll(function(){ if(!timer){ timer = setTimeout(function(){ timer = null; Event() },1000) } }) ex) 스크롤 이벤트 setTimeout 10초 설정 디바운싱 → 모든 스크롤.. js 2022. 7. 8. 14:14 [js]만 나이 구하기 See the Pen 만나이 구하기 by sangmok-ye (@sangmok-ye) on CodePen. js 2022. 7. 6. 16:21 [js]input text 전체 입력 시 버튼 활성화 See the Pen 전체 입력 시 버튼 활성화 by sangmok-ye (@sangmok-ye) on CodePen. input checkbox 전체 체크 시 버튼 활성화 https://yesm1230.tistory.com/43 js 2022. 6. 30. 17:59 [js]iframe 사용 시 부모 document접근하기(아이프레임) 모달 팝업 사용시 iframe으로 접근할 경우 $("iframe 내 close btn").click(function(){ $("body",parent.document).find(".layer").removeClass("on") }) .layer → 부모document내 layer틀 역할 iframe 내 파일 삽입 부모에 있는 input으로 iframe 스크립트 조절할때 $("부모에 있는 input", parent.document).change(function() { //실행될 함수 }); → 원래창에 있는 input값 변화 시 자식(iframe)에 있는 스크립트 실행 부모에서 iframe으로 접근할때 $(".handler").click(function(){ let target = $("iframe").c.. js 2022. 6. 13. 16:26 [js] css/js 비교 - 드래그하는 만큼 움직이는 슬라이드 swiper See the Pen 드래그하는 만큼 스크롤되기 by sangmok-ye (@sangmok-ye) on CodePen. js 2022. 5. 27. 15:12 [js]제이쿼리 라이브러리 모음 1. slick https://kenwheeler.github.io/slick/ slick - the last carousel you'll ever need slick is a responsive carousel jQuery plugin that supports multiple breakpoints, CSS3 transitions, touch events/swiping & much more! kenwheeler.github.io 2. swiper https://swiperjs.com/ Swiper - The Most Modern Mobile Touch Slider Swiper is the most modern free mobile touch slider with hardware accelerated tr.. 이전 1 2 3 4 5 6 7 8 다음