[jQuery] get parent element text while excluding child element text

[jQuery] get parent element text while excluding child element text


Is there a more elegant, concise, pure jQuery approach to doing the
following?...
HTML: <p id="test">paragraph_text<span>span_text</span>
JAVASCRIPT:
var p_txt = $('#test').text().substring(0, ($('#test').text().length -
$('#test span').text().length));
alert(p_txt);
OUTPUT: paragraph_text