8

My html code is as below.

<div id="chatbox_dipesh.parmar" class="chatbox">
  //html markup which is validated
</div>

in above code dipesh.parmar div added dynamically.

And i am accessing it using following code.

$("#chatbox_"+chatboxtitle).show();

where chatboxtitle is dipesh.parmar but its not selecting div.

Does . is not a valid for ID.?

My jQuery is loaded and its not conflicting with other library and also wrapped it into $(function(){ }).

Thanks.

Charles
  • 50,010
  • 13
  • 100
  • 141
Dipesh Parmar
  • 26,601
  • 7
  • 57
  • 86

1 Answers1

11

Escape the dot.

See this: Direction

Community
  • 1
  • 1
Rob
  • 4,891
  • 12
  • 49
  • 51