내 html 코드는와 같습니다.jQuery ID 선택기가 작동하지 않습니다. ID :
<div id="chatbox_dipesh.parmar" class="chatbox">
//html markup which is validated
</div>
위의 코드 dipesh.parmar
div가 동적으로 추가되었습니다.
그리고 다음 코드를 사용하여 액세스하고 있습니다. chatboxtitle
이 dipesh.parmar
하지만 선택하지 사업부입니다
$("#chatbox_"+chatboxtitle).show();
.
.
은 (는) 유효한 ID가 아닙니다.
내 jQuery가로드되어 다른 라이브러리와 충돌하지 않으며 $(function(){ })
에 래핑했습니다.
감사합니다.
는 점을 탈출. 이 참조 : [방향] [1] [1] : http://stackoverflow.com/questions/605630/how-to-select-html-nodes-by-id -with-jquery-when-id-contains-a-dot – Rob
'$ ("chatbox_dipesh.parmar")'는 id가'chatbox_dipesh'이고 클래스가'parmar' 인 요소를 찾는다. – arulmr
@Rob 너무 빨리 완벽한 솔루션. –