JSFiddle - React, Tailwind, and code Playground

by jt3k

HTML

<TABLE class="ms-formtable" style="margin-top: 8px;" border=0 cellpadding=0 cellspacing=0 width=100%>
            
            
            
        <TR>
        <TD nowrap="true" valign="top" width="190px" class="ms-formlabel"><H3 class="ms-standardheader">
        <nobr>Название<span class="ms-formvalidation"> *</span></nobr>
    </H3></TD>
        <TD valign="top" class="ms-formbody" width="400px">
        <!-- FieldName="Название"
             FieldInternalName="Title"
             FieldType="SPFieldText"
          -->
            <span dir="none">
        <input name="ctl00$m$g_ff1b89cf_01e1_4f63_ab0e_b5e1c75f8e9b$ctl00$ctl04$ctl00$ctl00$ctl00$ctl04$ctl00$ctl00$TextField" type="text" maxlength="255" id="ctl00_m_g_ff1b89cf_01e1_4f63_ab0e_b5e1c75f8e9b_ctl00_ctl04_ctl00_ctl00_ctl00_ctl04_ctl00_ctl00_TextField" title="Название" class="ms-long" /><br>
    </span>
            
            
        </TD>
    </TR>
    
        <TR>
        <TD nowrap="true" valign="top" width="190px" class="ms-formlabel"><H3 class="ms-standardheader">
        <nobr>Статус</nobr>
    </H3></TD>
        <TD valign="top" class="ms-formbody" width="400px">
        <!-- FieldName="Статус"
             FieldInternalName="Status"
             FieldType="SPFieldChoice"
          -->
            <span dir="none"><select name="ctl00$m$g_ff1b89cf_01e1_4f63_ab0e_b5e1c75f8e9b$ctl00$ctl04$ctl01$ctl00$ctl00$ctl04$ctl00$DropDownChoice" id="ctl00_m_g_ff1b89cf_01e1_4f63_ab0e_b5e1c75f8e9b_ctl00_ctl04_ctl01_ctl00_ctl00_ctl04_ctl00_DropDownChoice" title="Статус" class="ms-RadioText">
                    <option selected="selected" value="Новая">Новая</option>
                    <option value="В работе">В работе</option>
                    <option value="Доставка">Доставка</option>
                    <option value="Выполнено">Выполнено</option>

                </select><br></span>
            
            
        </TD>
    </TR>
    
        <TR>
        <TD nowrap="true" valign="top" width="190px"...

JavaScript

//$('tr > td:contains("товар ")').parent('tr').css('background', 'red').next('tr').css('background', 'yellow');
//$("td.ms-titlearealeft h3:contains('Товар')").text('LALALALAL');


$("td.ms-formlabel:contains(Товар)").parent("tr").css('background', 'red').hide()
    .next("tr").css('background', 'yellow').hide();

$("td.ms-formlabel:contains(Товар)").parent("tr").first().show()
                                      .next("tr").first().show();

//$("td.ms-formlabel:contains(Товар) + td > input").click(function() {
//    $(this).parent("tr").next("tr").show();
//});

//$("td.ms-formlabel:contains(Товар)").parent("tr").hide()
//    .next("tr")

//$("td.ms-formlabel:contains(Товар)").parent("tr").first().show();


//$("td.ms-formlabel:contains(Товар) select").click(function() {
//    $(this).parent("tr").next("tr").show();
//});

//$("table.ms-formtable h3:contains('Товар')").next('td').text('LALALALAL');
    //.css('background', 'red');
//$('.hehe').first().show();$('.hoho').first().show();
//$('.hoho td+td').append("<strong>Добавить</strong>");


//$('.hehe input').change(function() { $(this).css('background', 'red'); $(this).parent().parent().next('.hoho').show().next('.hehe').show(); });    
    //$(this).parent().next('.hoho').show();  });