분류 전체보기
-
[jquery] window scroll not workingError 2021. 3. 22. 16:52
에러 현재 스크롤 위치를 콘솔에 찍으려고 $(window).scroll 사용하였으나 반응이 없었음 해결 $(document).ready 추가 $(document).ready(function () { $("#main").on("scroll", function () { var scrollValue = $("#main").scrollTop(); console.log(scrollValue); }); }); stackoverflow.com/questions/5686629/jquery-window-scroll-event-does-not-fire-up jQuery window scroll event does not fire up I'm trying to implement a simple "stay inside the..
-
[css] ntn-child, ntn-last-childNote 2021. 3. 22. 15:25
:nth-child(), :nth-last-child() :nth-child()와 :nth-last-child()는 특정 순서에 있는 요소를 선택할 때 사용하는 선택자 :nth-child()는 앞에서부터 세고, :nth-last-child()는 뒤에서부터 :nth-child 앞에서부터 /* 목록의 두 번째 선택 */ li:nth-child(2) { color: red; } /* 목록의 4, 8, 12, 16...번째에 위치하는 모든 요소 선택 */ :nth-child(4n) { color: blue; } //홀수번째 :nth-child(odd) 또는 :nth-child(2n+1) //짝수번째 :nth-child(even) 또는 :nth-child(2n) // 임의의 10번째 요소 :nth-child(10..
-
[Codewars] Array.diffAlgorithm 2021. 3. 20. 17:58
www.codewars.com/kata/523f5d21c841566fde000009/train/javascript Codewars: Achieve mastery through challenge Codewars is where developers achieve code mastery through challenge. Train on kata in the dojo and reach your highest potential. www.codewars.com 더보기 배열 a에서 b 값과 같은 요소를 제거하고 리턴하는 문제 Your goal in this kata is to implement a difference function, which subtracts one list from another and retu..
-
[프로그래머스] 소수 만들기Algorithm 2021. 3. 18. 19:01
programmers.co.kr/learn/courses/30/lessons/12977 코딩테스트 연습 - 소수 만들기 주어진 숫자 중 3개의 수를 더했을 때 소수가 되는 경우의 개수를 구하려고 합니다. 숫자들이 들어있는 배열 nums가 매개변수로 주어질 때, nums에 있는 숫자들 중 서로 다른 3개를 골라 더했을 때 programmers.co.kr 더보기 문제 설명 주어진 숫자 중 3개의 수를 더했을 때 소수가 되는 경우의 개수를 구하려고 합니다. 숫자들이 들어있는 배열 nums가 매개변수로 주어질 때, nums에 있는 숫자들 중 서로 다른 3개를 골라 더했을 때 소수가 되는 경우의 개수를 return 하도록 solution 함수를 완성해주세요. 제한사항 nums에 들어있는 숫자의 개수는 3개 이상 ..
-
[Codewars] Sum of Digits / Digital RootAlgorithm 2021. 3. 17. 17:22
www.codewars.com/kata/541c8630095125aba6000c00/train/javascript Codewars: Achieve mastery through challenge Codewars is where developers achieve code mastery through challenge. Train on kata in the dojo and reach your highest potential. www.codewars.com 더보기 문제 Digital root is the recursive sum of all the digits in a number. Given n, take the sum of the digits of n. If that value has more than on..
-
[Codewars] Which are in?Algorithm 2021. 3. 15. 18:28
www.codewars.com/kata/550554fd08b86f84fe000a58/train/javascript Codewars: Achieve mastery through challenge Codewars is where developers achieve code mastery through challenge. Train on kata in the dojo and reach your highest potential. www.codewars.com 더보기 문제 a 배열에 있는 문자가 b 배열에 속해 있으면 그 문자들을 리턴(사전 순서로) Given two arrays of strings a1 and a2 return a sorted array r in lexicographical order of the..