Lizzaran
Lizzaran

Reputation: 155

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?

Upvotes: 1

Views: 323

Answers (1)

rkw
rkw

Reputation: 7297

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

Upvotes: 3

Related Questions