I have the following content:
<input type='checkbox' id='inputCheckbox'/><strong>sdfsf</strong><p>dfsfsdsd</p>
From the elements above, I only need to get these elements when the checkbox are selected and omit the input element:
<strong>sdfsf</strong><p>dfsfsdsd</p>
My attempt:
$("#testPatternButton").on("click", function()
{
$("input:checked").each(function()
{
alert($(this).parent().children().not("input").html()); // only the strong text shows up
});
});