javascript - When "zoom in" at Facebook, the chat sidebar got hidden, but how? -


i not sure notice facebook can detect users zoom-in level when hits level, dynamically add .hidden_elem classname onto .fbchatsidebar hide it. (check attachments below)

inspector

enter image description here

i have searched lot feature , found repo in github called detect-zoom, seems there still problems in latest version of ff & chrome.

so curious how facebook detect javascript , have tried latest ff & chrome , seems facebook can detect correctly , hide sidebar @ right zoom-in level.

does know how implement feature ? or possible solutions welcome.

thanks.

i'm not sure exact solution facebook using discovered hide sidebar on both window resize , zoom.

my research shows browsers, including ie8 , fires window.resize event when zooming well. setting breakpoint when wish hide should able implement similar functionality.

quick , dirty example: http://jsbin.com/ofufer/1/


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -