What I am trying is if a user has entered a value with multiple spaces I want them to copy it to a span. But the issues is span eliminates all spaces. So how can I achieve this functionality.
What I have tried;
Html
<span class="span"></span><br>
<input  type="text" value="1               1" />
CSS
$(document).ready(function(){
    var inputVal = $('input').val();
    $('.span').text(inputVal);
});
Higher still and higher From the earth thou springest Like a cloud of fire; The blue deep thou wingest, And singing still dost soar, and soaring ever singest.which is rendered as: Higher still and higher From the earth thou springest Like a cloud of fire; The blue deep thou wingest, And singing still dost soar, and soaring ever singest. – Nitin Kaushal Sep 26 '14 at 09:19