I need to remove the "disabled" property from a button. I have been trying to achieve this via jQuery and I know what exactly to do ($(.button).removAttr("disabled")
), the only problem is that this button is deep inside the hierarchy and I am not able to grab it through my code. Inside my scss file, I am able to work with this element by doing something like this:
.parent ::ng-deep .child {
margin-left: 1px;
}
Though when I try $(.parent ::ng-deep .child).removAttr("disabled")
in my jQuery code I get a syntax error since I believe ::ng-deep is not allowed in jQuery. Is there a way I can mirror the functionality of ::ng-deep in my jQuery code?
Edit: I am using Alfresco Development Framework(ADF). This is the adf-viewer component to be precise. the html code looks something like this:
I am not able to grab the highlighted div (adf-viewer-container) which is a child of adf-viewer element. I started off from a parent at a much higher level and could trace my way upto adf-viewer. The button I am targeting is deep inside the highlighted div.
In the scss file this works:
.inner-layout .inner-layout__content adf-viewer ::ng-deep .adf-viewer-container {
// do something
}
P.S. Since this button is a part of a third-party component I do not have the ability to manipulate the HTML file. I have been using the developer tools to look at hierarchy. I also read about shadow DOM, but parent.shadowRoot is null. The regular jQuery operator '>' didn't work either.
Any help is highly appreciated