jQuery id选择器在运行时不起作用.在ID中 [英] jQuery id selector not working when have . in ID
本文介绍了jQuery id选择器在运行时不起作用.在ID中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的html代码如下.
My html code is as below.
<div id="chatbox_dipesh.parmar" class="chatbox">
//html markup which is validated
</div>
在上面的代码dipesh.parmar
div中动态添加.
in above code dipesh.parmar
div added dynamically.
我正在使用以下代码对其进行访问.
And i am accessing it using following code.
$("#chatbox_"+chatboxtitle).show();
其中chatboxtitle
是dipesh.parmar
,但未选择div.
where chatboxtitle
is dipesh.parmar
but its not selecting div.
.
对ID无效吗??
我的jQuery已加载且与其他库没有冲突,也将其包装到$(function(){ })
中.
My jQuery is loaded and its not conflicting with other library and also wrapped it into $(function(){ })
.
谢谢.
推荐答案
转义点.
查看此: 方向
这篇关于jQuery id选择器在运行时不起作用.在ID中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文