how do i trim using this
$('#type_of_station').text()
the result is
>>> $('#type_of_station').text()
"pizza delivery system "
As you can see there is a space after the last word
how do i trim using this
$('#type_of_station').text()
the result is
>>> $('#type_of_station').text()
"pizza delivery system "
As you can see there is a space after the last word
jQuery:
str = jQuery.trim(str);
JavaScript:
str = str.replace(/^\s*/, "").replace(/\s*$/, "");