var machine = $('h1').contents(':not(small, a)').text();
console.log(machine);
<h1>Title <small>subheading</small> <a href="#"></a></h1>
I am trying to get the text which is Title
to display using the above jQuery but of course this console.logs a blank line. Basically excluding the small
and a
tags