I am trying to set and read value of a lable in jquery but it returns empty
$('label#ringIdLabel').text(jQuery(this).val());
It shows label text as xx
but when retrieving with
var ringId = $("#ringIdLabel").val();
it turns out to be empty. My lable is defined as
<label id="ringIdLabel" style="visibility: hidden;" ><?php echo $mainRing['id'] ?></label>