728x90
반응형
https://link2me.tistory.com/2044
jQuery 사용자 정의 메소드 만들기 ($.fn.메소드명)
// jQuery prototype " target="_blank" rel="noopener">https://code.jquery.com/jquery-3.5.1.min.js"> jQuery Selector를 이용하는 메소드를 추가하려면 $.fn.메소드명 을 통해 추가한다. this 키워드는 $("selector") 를 통해 들어온
link2me.tistory.com
$.fn.메서드명 으로 함수를 정의하면
$('선택자').메서드명으로 사용할 수있다.
그러면 $.fn.메서드명 = () => {
$(this). ,,,,, (생략) => $(this) == $('선택자')
}
728x90
반응형
'Front > JS & jQuery' 카테고리의 다른 글
[js] try ... catch (0) | 2023.09.12 |
---|---|
[js] 모바일 브라우저 감지 (0) | 2023.09.10 |
[js][Bootstrap] 모달 창 외부클릭, esc 클릭 닫힘 방지 옵션 (0) | 2023.09.06 |
[js] clearInterval() (0) | 2023.09.05 |
[js] setInterval() (0) | 2023.09.04 |