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)
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
Post a Comment