Extended profile field wrapper
-
I’m using BuddyPress for a members only section of a website. I’ve created some custom profile fields for each member. I need the Member Number field to be converted to a barcode to display in the profile header of the member profile. I have the JS working to generate the barcode but I have to add an id to the Member Number wrapper to make it work correctly.
This is what BuddyPress renders:
<tr class=”field_52 field_member-number optional-field visibility-public field_type_textbox”>
<td class=”label”>Member Number</td>
<td class=”data”><p>cm12345</p></td>
</tr>This is what I need:
<tr class=”field_52 field_member-number optional-field visibility-public field_type_textbox”>
<td class=”label”>Member Number</td>
<td class=”data”><p id=”MemNum”>cm12345</p></td>
</tr>Anyone know how this might be achieved?
I’ve been trying this script but with no luck, not really competent with JS at all.
<script type=”text/javascript”>
$(document).find(‘.field_52 .data’).attr(‘id’, ‘MemNum’);
</script>Any help or suggestions would be greatly appreciated.
- You must be logged in to reply to this topic.