Replace any (.) periods with escape backslashes so I can select elements
<p>I have some elements with (.) periods in them and I need to select them but I need some escape characters to do so I believe.  How can I sure that my string that may have a period in it will be escaped properly. Something like this I guess?</p>

<pre><code>var title = "User1.Title";
var string = //replace any periods with escape sequence?
$('#'+string).show();
</code></pre>

<p>It may have more than one (.) period, hopefully not but if I can replace all (.) periods so I can do my selection that would be great.</p>
