title: Select closest element of type "h", e.g. h1, h2, etc
body: <p>Assume I select an element using <code>$(mySelector)</code>. I would like to select the closest heading to it, so if the closest heading element to it was an <code>&lt;h2&gt;</code>, it would select that, but if the closest was an <code>&lt;h3&gt;</code>, it would select that instead. How can I do this?</p>