Assume the follow code
<div class="hello">
<h2>I'm a header</h2>
</div>
<script>
foo = $('.hello');
</script>
How do I select the h2 tag from foo and replace it’s contents?
I’m basically looking for the equivalent of $(‘.hello > h2).html(‘New header’) but on the variable.
Are you looking for: