Activity Forums Salesforce® Discussions How to remove slds class of a tag in js controller in the Salesforce lightning component?

  • Nikita

    Member
    November 22, 2019 at 7:58 am

    Hi Yogesh,

    You can remove a CSS style on a component or element during runtime.
    To retrieve the class name on a component, use component.find('myCmp').get('v.class'), where myCmp is the aura:idattribute value.

    To remove CSS classes from a component or element, use the $ $A.util.removeClass(cmpTarget, 'class') methods.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos