split the contents of an object

var strip_name;
var new_name;

strip_name = jQuery("span.actual").text();
new_name = strip_name.split(' ')[0]+" "+strip_name.split(' ')[1];
jQuery("span.actual").replaceWith(new_name);
Advertisements