css - Jquery .children() -- parent has unique class, child has nonunique class, select child -


i have form generated crm.

  <fieldset><legend>publish name in newspaper   </legend> <div class="crm-section custom_67-section"><div class="label"><label>  check here if may release name , contribution levels   <span class="crm-marker" title="this field 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>&nbsp; <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> 

since class "label" used repeatedly elsewhere in form, need select div class='label' inside div class="crm-section custom_67-section".

this have

jquery(document).ready(function(){     jquery(.'crm-section custom_67-section').children(.'label').attr("style","width:500px;"); }); 

multiple class selector same element uses multiple dots.

jquery('.crm-section.custom_67-section') 

.' invalid syntax .. should '. instead.

finally, should use .css set styles rather updating style attribute.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -