Slaesforce FAQ

a.util.toggleclass in salesforce

by Zita Homenick MD Published 2 years ago Updated 2 years ago
image

What is a util toggleClass?

util. toggleClass(cmp, 'class') , which adds or removes the class. The cmp parameter can be component or a DOM element.

What is $a in lightning Salesforce?

$A is how you gain access to the underlying Aura framework, such as enqueuing actions, getting application events, managing the Aura rendering life cycle, and various utility methods.

How do you add a style dynamically in lightning component?

To find component, use component. find('Cmp'),where Cmp is the aura:id attribute value....Create Lightning ComponentTo add CSS style use $A. ... Whenever the user clicks on “Add style” button the “addclass” controller method gets invoked and it will appends the CSS style to the component or element.More items...•

How do you add a CSS class in Aura component?

Add CSS to a component bundle by clicking the STYLE button in the Developer Console sidebar. You can't add a