0

This is quite hard to explain....

I'm using a framework that displays statusbar (display: none/block) after the page have been loaded (javascript).

Is there a way to "live" check if there's changes in that specific selector?

Sudhir Bastakoti
  • 99,167
  • 15
  • 158
  • 162
Plexus81
  • 1,221
  • 6
  • 23
  • 44

2 Answers2

1

If you're asking to be triggered when css property change, take a look at this similar question : Event detect when css property changed using Jquery.

The posted solution propose to use a trigger on "DOMAttrModified". But be careful if this answer fit your needs about browser compatibility.

Community
  • 1
  • 1
Mordhak
  • 2,646
  • 2
  • 20
  • 14
0

Do you mean like:


$(document).ready(function() {
  if($("#yourElement").is(":visible")) {
    //is visible
  }
  else {
    //none
  }
});
Sudhir Bastakoti
  • 99,167
  • 15
  • 158
  • 162