I have several pages that contain dynamic controls. This means I never know which types or how many controls I have on a page. I need a script that selects the text out of a text area when it is clicked. I was thinking the below script would work but it doesn't seem to be functioning as expected.
$(function () {
    $('input[type=textarea]').focus(function () {
        inputValue = this.value;
    });
});
<div style="display: table;">
    <div style="display: table-row">
        <div style="display: table-cell;">
            <span style="font-weight: bold">TextArea 1</span>
        </div>
    </div>
    <div style="display: table-row">
        <div style="display: table-cell;">
            <textarea id="txtTextArea1" rows="3" cols="30">