Hide a parent div using its inner div data-id From view file

We can hide a parent div in according with the conditions in its inner div from the view file without making any changes in template file or SASS file.We can add the below code in corresponding script file itself for achieving the same.

const element = document.querySelector('[data-id="custcol_ag_logolayout"]');
const parent=element.parentNode;
parent.style.display = 'none';

Leave a comment

Your email address will not be published. Required fields are marked *