Remove a letter(:) from a string
<p>I have strings like Name:, Call:, Phone:....and so on in my table. I am learning jQuery and was able to access the text. My tutorial has used <code>trim()</code> to remove any whitespaces. But I want o remove ":" from the end of each string (and yes, it always lies in the end after calling <code>trim()</code> method). So how to achieve it.</p>

<p>Its my code:</p>

<pre><code>&lt;script type="text/javascript"&gt;
    $(function ()
    {
        $(':input[type=text], textarea').each
    (
    function ()
    {
        var newText = 'Please enter your ' +
    $(this).parent().prev().text().toLowerCase().trim();
        $(this).attr('value', newText);
    }).one('focus', function ()
    {
        this.value = '', this.className = ''
    }).addClass('Watermark').css('width', '300px');
    });
&lt;/script&gt;
</code></pre>

<p>trim(":") did not help...</p>
