0

I am working on a jQuery plugin where I need to manipulate DOM for some insertions and deletions and I am required to work with some specific class (say class demo). I have to make it work with Angular/AngularJS/JS or any framework.

Problem I am facing is How can I detect that particular class visibility in DOM If user is hiding that element or say loading another component or routing to another page. (like in Angular2/4/5 we normally do with ngIf etc. ) I came across this livequery but it does not work as expected. Any link/example/suggestion would be grateful.

PS: and also I don't want to provide any function from my code, which is required to call in their component etc

Brian Tompsett - 汤莱恩
  • 5,195
  • 62
  • 50
  • 120
  • Possible duplicate of [How do I check if an element is hidden in jQuery?](https://stackoverflow.com/questions/178325/how-do-i-check-if-an-element-is-hidden-in-jquery) – Mark Baijens Sep 28 '18 at 10:42
  • Thanks for the link, but my case is to detect when there is a page change or css change (to hide/unhide element) If my code runs initially and I need to run again when user do some action on a page. what event is supposed to be – shubham singh Sep 28 '18 at 11:16
  • Well it's not really clear what you mean with "some action" but you might wan to look into MutationObserver – Mark Baijens Sep 28 '18 at 11:25

0 Answers0