How to remove whitespace after/inside <div>?

How to remove whitespace after/inside <div>?

Assume the following code:

  1. <div class="foobar">
  2.   "whitespace"
  3.   <p>....</p>
  4. </div>

"whitespace" is not the text but a whitespace as indicated in Firefox WebDeveloper.

How can I get rid of every whitespace inside after a <div class=foobar"> and the first <p> with jQuery?