When element becomes visible jquery?

When element becomes visible jquery?

Hey guys
Just wondering if there is a way to get some code to run when an element becomes visible or invisible...
Cheers
Anthony