Posted By

iloveitaly on 08/27/10


Tagged

DOM screen mootools visible


Versions (?)

Check if DOM Element is Fully Visible


 / Published in: JavaScript
 

URL: http://stackoverflow.com/questions/1056357/best-way-to-find-if-a-dom-object-is-visible-or-not-using-mootools/3568770#3568770

  1. Element.implement({
  2. isFullyVisible: function() {
  3. if(this.isVisible()) {
  4. var coord = this.getCoordinates(),
  5. winScroll = window.getScroll();
  6.  
  7. return winScroll.y <= coord.top;
  8. } else {
  9. return false;
  10. }
  11. }
  12. });

Report this snippet  

You need to login to post a comment.