본문 바로가기

웹 개발/jQuery

(jQuery object).click 이 IE에서 안될 수 있다.




jQuery('#nyroModalContent #btnRefundCouponBook').click( callback ~

위 구문은 Firefox 및 chrome에서는 아무 이상 없다.

단 IE에서는 에러 뱉어낸다... 지원하지 않는 함수 입니다.

그럴땐 아래 처럼...

jQuery('#nyroModalContent #btnRefundCouponBook').live('click', function(){

설명은 간략하게 한다면 아래처럼 누군가가 해주었는데..
you could use one of jQuery's fancy plugins like liveQuery which monitors the DOM for changes and then re-assigns the event's function when you add something. Although, be careful because liveQuery doesn't really monitor the DOM; it just extends jQuery's 'append','prepend','html',etc. methods and re-assigns when something is added, so if you add something to the DOM using another library or native JavaScript methods then liveQuery will not work.

해석은 생략한다.. 
live를 통해서는 append, prepend, html 등 기본적인 것에 대한 새로운 callback 정의가 가능하다는 것..

'웹 개발 > jQuery' 카테고리의 다른 글

select box 선택해제  (0) 2013.07.09
.innerHTML 과 .html() 차이!!  (0) 2010.07.13
[Error] Component returned failure code: 0x80070057  (0) 2010.06.22
Simple Modal  (0) 2010.04.22
[Link] jQuery 50+ Amazing Examples - Part1  (0) 2010.04.22