Below code will show paragraph using JQuery. You can download the Jquery from http://docs.jquery.com/Downloading_jQuery
var str = " Virendra Dugar @ Dotnetfunda.com ";
str = jQuery.trim(str);
Jquery provides a in-built function called trim() which removes spaces from starting and from end of the string.
Output of this would be "Virendra Dugar @ Dotnetfunda.com
". Trim() function only removes spaces from starting and end of the string. If there are any space between middle of the statement that is ignored.
Visit my blog