Home How to track DOM element's class attribute changes and apply same on some element
Reply: 0

How to track DOM element's class attribute changes and apply same on some element

user854
1#
user854 Published in June 19, 2018, 2:30 pm

I have a angularjs component, In the component I have following HTML

<div id="panel" class="hide-div">
  <div id="viewPort" class="hide-div">
     ...
  </div>
</div>

There is a third party javascript/jquery library, I don't have control over third party library, third-party library removes the class hide-div from the viewPort on some server-side event.
hide-div class hides the element.

Now my requirement is to remove the hide-div class from panel, when it is removed from viewPort. In short if viewPort is hidden then panel should be hidden and if viewPort is visible then panel should be visible too.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.35997 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO