Auto populate text box when Check box id checked - Jquery
<p>I working to put functionality for a check box. When the check box is checked I would like to auto populate the text box with yes. But I couldn't able to get the functionality.
Any insights is highly appreciated.
Below is code I tried to work with</p>

<pre><code> &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;
        &lt;/script&gt;
        &lt;script language="JavaScript"&gt;
        $(document).ready(function() 
        {    
      $('#checkboxid').attr('checked', true) {
            $("input[Title='Text Box Name']").val("Yes");    }

        });
        &lt;/script&gt;
</code></pre>

<p>Below is the HTML code for those two items. Please bare with my HTML code, it is auto generated code for Sharepoint.</p>

<p>For Text Box and Check Box    </p>

<pre><code>&lt;TR&gt;&lt;TD nowrap="true" valign="top" width="190px" class="ms-formlabel"&gt;
&lt;H3 class="ms-standardheader"&gt;
            &lt;nobr&gt;Text Box name&lt;/nobr&gt;
        &lt;/H3&gt;&lt;/TD&gt;&lt;TD valign="top" class="ms-formbody" width="400px"&gt;
    &lt;div align="left" class="ms-formfieldcontainer"&gt;
&lt;div class="ms-formfieldlabelcontainer" nowrap="nowrap"&gt;
&lt;span class="ms-formfieldlabel" nowrap="nowrap"&gt;Text Box name&lt;/span&gt;&lt;/div&gt;
&lt;div class="ms-formfieldvaluecontainer"&gt;&lt;span dir="none"&gt;
&lt;input name="ctl00$m$g_89e4bf6d_529c_49e0_95e0_7024e4172c50$ctl00$ctl04$ctl63$ctl00$ctl00$ctl04$ctl00$ctl00$TextField" type="text" maxlength="255"
id="ctl00_m_g_89e4bf6d_529c_49e0_95e0_7024e4172c50_ctl00_ctl04_ctl63_ctl00_ctl00_ctl04_ctl00_ctl00_TextField" 
title="Text Box name" class="ms-long" /&gt;&lt;br&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/TD&gt;&lt;/TR&gt;

&lt;TR&gt;&lt;TD nowrap="true" valign="top" width="190px" class="ms-formlabel"&gt;
&lt;H3 class="ms-standardheader"&gt;
&lt;nobr&gt;Check Box name&lt;/nobr&gt;
    &lt;/H3&gt;&lt;/TD&gt;
        &lt;TD valign="top" class="ms-formbody" width="400px"&gt;
        &lt;div align="left" class="ms-formfieldcontainer"&gt;
        &lt;div class="ms-formfieldlabelcontainer" nowrap="nowrap"&gt;
        &lt;span class="ms-formfieldlabel" nowrap="nowrap"&gt;Check Box name&lt;/span&gt;&lt;/div&gt;
        &lt;div class="ms-formfieldvaluecontainer"&gt;&lt;span dir="none"&gt;
        &lt;input id="ctl00_m_g_89e4bf6d_529c_49e0_95e0_7024e4172c50_ctl00_ctl04_ctl60_ctl00_ctl00_ctl04_ctl00_ctl00_BooleanField" 
        type="checkbox" 
        name="ctl00$m$g_89e4bf6d_529c_49e0_95e0_7024e4172c50$ctl00$ctl04$ctl60$ctl00$ctl00$ctl04$ctl00$ctl00$BooleanField" /&gt;&lt;br&gt;
    &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/TD&gt;&lt;/TR&gt;
</code></pre>
