Better :visible selector
$.extend $.expr[":"],
seen: (elem, i, match, array) ->
try
rect = elem.getBoundingClientRect()
el = document.elementFromPoint(rect.left+1, rect.top+1)
el is elem or $.contains(elem,el)
catch e
false
Written by Szikszai Gusztáv
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Coffeescript
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#