가능한 중복 :
How to select html nodes by ID with jquery when the id contains a dot?jQuery 점이 ID 선택기에 있습니까?
나는이와 유사한 요소가 포함 된 웹 사이트를 가지고 : 나는 $('#root.SomeCoolThing')
같은 jQuery로 단락을 선택할 수 없습니다
<p id="root.SomeCoolThing">Some Cool Thing</p>
를 jQuery를하기 때문에 생각해, SomeCoolThing
는 id="root"
인 요소의 클래스입니다.
어떻게이 요소를 jQuery와 함께 선택할 수 있습니까? 다음과 같이
$(document.getElementById('root.SomeCoolThing'))
http://stackoverflow.com/questions/605630/how-to-select-html-nodes-by-id-with-jquery-when-the-id-contains-a-dot – David
이 비록 두 개의 '\\\'가있는 솔루션입니다. 왜 이드의 내부에 점을 넣었습니까? – gdoron
글쎄, 웹 사이트가 나 한테서 만들어진 게 아니야. 나는 ID 이름을 좋아하지도 않는다. 보다 정확하게는 API 문서입니다. –