You can capture it with an identifier selector by going to .parent()and using .text():
$("#305").parent().text()
$("label[for='305']").text();
Although identifiers starting with a number are not valid until HTML5, just keep in mind :)
You can also get it without jQuery, for example:
document.getElementById("305").nextSibling.nodeValue
Although you can crop it with $.trim()for example:
$.trim(document.getElementById("305").nextSibling.nodeValue)
source
share