Below is some HTML code that I am working with:
<dl>
<dt><label>test</label></dt>
<dd><input id="someid" type="checkbox" onchange="opConfig.reloadPrice()" class="product-custom-option"></dd>
<dt><label>test</label></dt>
<dd><input id="someid" type="checkbox" onchange="opConfig.reloadPrice()" class="product-custom-option"></dd>
<dt><label>test</label></dt>
<dd><input id="someid" type="checkbox" onchange="opConfig.reloadPrice()" class="product-custom-option"></dd>
<dt><label>test</label></dt>
<dd><input id="someid" type="checkbox" onchange="opConfig.reloadPrice()" class="product-custom-option"></dd>
</dl>
<script>
reloadPrice: function() {
var config = this.config;
var skipIds = [];
$$('body .product-custom-option').each(function(element){
//todo
});
</script>
I am trying to extract the text of the label within the dt element in a loop. There is a function named 'reloadprice' in my prototype function which runs on the change event. How can I retrieve the label text using prototype? Any assistance would be greatly appreciated.