我有一个由 CRM 生成的表格。
<fieldset><legend>Publish Name in Newspaper
</legend>
<div class="crm-section custom_67-section"><div class="label"><label> Check here if we may release your name and contribution levels
<span class="crm-marker" title="This field is required.">*</span>
</label></div>
<div class="content">
<input value="1" type="radio" id="CIVICRM_QFID_1_20" name="custom_67" class="form-radio" />
<label for="CIVICRM_QFID_1_20">Yes</label>
<input value="0" type="radio" id="CIVICRM_QFID_0_22" name="custom_67" class="form-radio" />
<label for="CIVICRM_QFID_0_22">No</label></div>
<div class="clear"></div></div></fieldset>
div class='label'
由于“标签”类在表单的其他地方重复使用,我只需选择div class="crm-section custom_67-section"
.
这就是我所拥有的
jQuery(document).ready(function(){
jQuery(.'crm-section custom_67-section').children(.'label').attr("style","width:500px;");
});