0
<div class="edit-mode-panel">


    <div class="DefaultContentBlock" style="border:medium black solid; background:yellow; color:black; margin:20px; padding:10px;">
    <div id="test2" data-name="Page Field: Jump Link Choice"><div align="left" class="ms-formfieldcontainer"><div class="ms-formfieldlabelcontainer" nowrap="nowrap"><span class="ms-formfieldlabel" nowrap="nowrap">Jump Link Choice</span></div><div class="ms-formfieldvaluecontainer"><span dir="none"><table cellpadding="0" cellspacing="1">
        <tr>
            <td><span class="ms-RadioText" title="Heading 1"><input id="ctl00_PlaceHolderMain_ctl02_ctl00_ctl00" type="checkbox" name="ctl00$PlaceHolderMain$ctl02$ctl00$ctl00" checked="checked" /><label for="ctl00_PlaceHolderMain_ctl02_ctl00_ctl00">Heading 1</label></span></td>
        </tr><tr>
            <td><span class="ms-RadioText" title="Heading 2"><input id="ctl00_PlaceHolderMain_ctl02_ctl00_ctl01" type="checkbox" name="ctl00$PlaceHolderMain$ctl02$ctl00$ctl01" checked="checked" /><label for="ctl00_PlaceHolderMain_ctl02_ctl00_ctl01">Heading 2</label></span></td>
        </tr><tr>
            <td><span class="ms-RadioText" title="Heading 3"><input id="ctl00_PlaceHolderMain_ctl02_ctl00_ctl02" type="checkbox" name="ctl00$PlaceHolderMain$ctl02$ctl00$ctl02" checked="checked" /><label for="ctl00_PlaceHolderMain_ctl02_ctl00_ctl02">Heading 3</label></span></td>
        </tr><tr>
            <td><span class="ms-RadioText" title="Heading 4"><input id="ctl00_PlaceHolderMain_ctl02_ctl00_ctl03" type="checkbox" name="ctl00$PlaceHolderMain$ctl02$ctl00$ctl03" /><label for="ctl00_PlaceHolderMain_ctl02_ctl00_ctl03">Heading 4</label></span></td>
        </tr>
    </table></span></div></div>
    </div>

    </div>


</div>

I have this bit of code, how can I filter out so it just says

    <tr>
        <td><span class="ms-RadioText" title="Heading 1"><input id="ctl00_PlaceHolderMain_ctl02_ctl00_ctl00" type="checkbox" name="ctl00$PlaceHolderMain$ctl02$ctl00$ctl00" checked="checked" /><label for="ctl00_PlaceHolderMain_ctl02_ctl00_ctl00">Heading 1</label></span></td>
    </tr><tr>
        <td><span class="ms-RadioText" title="Heading 2"><input id="ctl00_PlaceHolderMain_ctl02_ctl00_ctl01" type="checkbox" name="ctl00$PlaceHolderMain$ctl02$ctl00$ctl01" checked="checked" /><label for="ctl00_PlaceHolderMain_ctl02_ctl00_ctl01">Heading 2</label></span></td>
    </tr><tr>
        <td><span class="ms-RadioText" title="Heading 3"><input id="ctl00_PlaceHolderMain_ctl02_ctl00_ctl02" type="checkbox" name="ctl00$PlaceHolderMain$ctl02$ctl00$ctl02" checked="checked" /><label for="ctl00_PlaceHolderMain_ctl02_ctl00_ctl02">Heading 3</label></span></td>
    </tr><tr>
        <td><span class="ms-RadioText" title="Heading 4"><input id="ctl00_PlaceHolderMain_ctl02_ctl00_ctl03" type="checkbox" name="ctl00$PlaceHolderMain$ctl02$ctl00$ctl03" /><label for="ctl00_PlaceHolderMain_ctl02_ctl00_ctl03">Heading 4</label></span></td>
    </tr>
1
  • wrong stackoverflow sorry – bimbob Jul 3 '14 at 13:58
1

You can use jQuery to get the inner content.

var innerContent = $("div.edit-mode-panel").find('table:first').html();

$("#result").append(innerContent);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.