I have the following HTML in the form according:
<li class="AddressBlock form-q label-left form-focused" id="q77" name="q77" attrtype="address" attr="Vendor_Address"> <label for="Field77" class="cf-label">Vendor Address<span class="cf-required">*</span></label> <div class="cf-field"> <div class="cf-address cf-fluid clearfix"> <div class="cf-full cf-val ws-invalid"> <label for="Field77_DSG0" class="cf-helptext">Street Address</label> <input type="text" required="required" value="" class="form-item-field required Address1 user-error" style="margin-bottom: 3px;" name="Field77_DSG0" id="Field77_DSG0" aria-invalid="true" aria-describedby="errorbox-1">
If I try to reference it using:
$('.AddressBlock > .Address1').val();
I can't seem to reference it. However if I use:
$('#Field77_DSG0').val
It works fine. However do to the complecity of the script I am writing, I am hoping to use the classes I added onto the controls to make it more readable. Any idea what I am doing wrong? I've also tried '.AddressBlock > .Address1' (without the input).