title: jQuery when element becomes visible
body: <p>Basically, I am wondering if there is a way to automatically run a function when an element becomes hidden or visible, not on a user click but automatically in another script.</p>
  
  <p>I don't want this to just run one time, because the elements (such as a slider) constantly change from visible to hidden.</p>
  
  <p>Would this be something that jQuery can do with bind? Such as binding the element's visibility to a function (I don't know how to write this)</p>
  
  <p>If you need me to elaborate more on what I'm trying to do, let me know. Thanks</p>
  
  <p>Pseudocode: </p>
  
  <pre><code>$('#element').bind('display:none', function);
  function(){
      //do something when element is display:none
  }
  
  $('#element').bind('display:block', function2);
  function2(){
      //do opposite of function
  }
  </code></pre>