Check if DOM Element is Fully Visible


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  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. });

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.