If you want the text of the entire tag to puse:
var text = $("#blah p").text();
Otherwise, if you want to exclude the part span, use:
var text = $("#blah p").contents(":not(span)").text();
Now your text will be saved in a variable named text.
source
share