728x90
반응형
jQuery.noConflict() | jQuery API Documentation
jQuery.noConflict() | jQuery API Documentation
Description: Relinquish jQuery's control of the $ variable. Many JavaScript libraries use $ as a function or variable name, just as jQuery does. In jQuery's case, $ is just an alias for jQuery, so all functionality is available without using $. If you need
api.jquery.com
jQuery를 사용할 때 다른 라이브러리와 충돌이 나는 경우가 있습니다. 충돌의 원인은 두 가지로 구분할 수 있습니다.
- 다른 라이브러리와 충돌
- 다른 버전의 jQuery와 충돌
@
1
2
3
4
5
6
7
|
var j = jQuery.noConflict(); // Do something with jQuery j( "div p" ).hide(); // Do something with another library's $() $( "content" ).style.display = "none"; |
@
728x90
반응형