Like this?
$('#phonenumber').html(function(_, html){ //Use html callback function
return $.map(html.split(/\s+/), function(val){ // split the current text based on spaces and use $.map to get the html span.
return $('<span/>',{text:val}); //construct the span.
});
});
This is the output:
<div id="phonenumber">
<span>888-888-888</span>
<span>888-888-8888</span>
</div>