Try using the DOM function .nextSibling
to pick the next node (including the text nodes) and use nodeValue
to get the text All the world
$(':checkbox')[0].nextSibling.nodeValue
Try using the DOM function .nextSibling
to pick the next node (including the text nodes) and use nodeValue
to get the text All the world
$(':checkbox')[0].nextSibling.nodeValue