fix for issue #10483
variable for found avatar div
restrict $div to local scope
Merge pull request #11428 from michag86/patch-1

fix for issue #10483