is it possible to add an attribute to an element based on it's class name? For example, I have an input type checkbox like below
<input type="checkbox" class="ui-corner-all">
And I need to add an attribute called "tooltip" and a value for that tooltip if any element had the class name as "ui-corner-all". Which ultimately should become like
<input type="checkbox" tooltip="Corner All" class="ui-corner-all">
It is a dynamically generated element and I have no access to the HTML, need to do it via .ts file only. Any help on this? Thanks