VISUALFORCE and JS CODE:
onclick=”changeFont(this,'{!$Component.thePanel}’);”/>
Note:
‘{!$Component.idName}‘ : This is the way of passing particular visualforce component id into the javascript.
3x Salesforce MVP | Platform Champion | 20x Salesforce Certified | MuleSoft Certified | All Star Ranger | TechForce Services | Sydney | Australia