Search code examples
javascriptjqueryjquery-uivisible

jQuery - Check if element is visible after dragging


I'm loading elements via ajax, for a map. Some of them are only visible if you drag (with jquery-ui) the map. (overflow:hidden) Is there any way I can know if an element(div) is now in the visible part of the page?


Solution

  • you can get the $(window).height() and .width() and see if the $('div').position().top and .left are in it.