With this HTML:
<h1>This is my <img src="https://dummyimage.com/100x50/000/fff&text=BIG" alt="BIG"> title</h1>
In Chrome or Firefox, if I select the rendered text and copy it (Ctrl-C), I'll get
This is my BIG title (the alt text of the image is included in the copied text)
Can I achieve the same using jQuery? $('h1').text() gives me only This is my title (without BIG).
I know I can get the alt text itself with $('h1').attr('alt') but how do I insert it at the correct position in the .text() string?