select2 custom select trigger css로 해결 기본 select style을 못견디는 디자이너를 위해 평소에는 ul과 li로 select의 멋을 지켜왔지만 등록 폼과 같은 엄청난 select의 향연인 페이지에선 부득이하게 기본 select와 option을 사용해야 할 때가 있다. 이럴 경우 select에서라도 최선을 다했음을 어필하기 위해 성별 남 여 .selectInputDiv:after{ content:''; display: inline-block; width: 10px; height: 10px; border-right: 2px solid #CECECE; border-bottom: 2px solid #CECECE; transform: rotate(45deg); position: absolute; top: 13px; right: 17px; } :a.. 2023. 11. 14. 하나의 요소에 removeClass와 toggleClass 사용하기 select 모양의 div menu 작업 시 사용 select를 클릭하면 해당 옵션 외 다른 옵션창 닫힘 해당 select 한번 더 클릭하면 해당 옵션도 닫힘 not($(this))로 제어가능 $('.on').on('click, touchstart', function(){ $('.on').not($(this)).removeClass('on'); $(this).toggleClass('on') }) 2020. 12. 3. 이전 1 다음