How can I detect if a user is "browsing" a page or seeing a Ribbon tool?
-
11 aprilie 2012 22:15
When a person selects "browse" you see the breadcrumb, the search bar, etc. Is there a way to detect if a user is browsing a page or in a ribbon? I want to display some content on the homepage of a site when a person is browsing and hide the content when a ribbon becomes active.
I've looked hard for a javascript variable or any other way to know if a ribbon is visible or not but I'm coming up empty handed. Surely something must change when the person moves to or from browse view but I just can't figure it out.
Jay
Toate mesajele
-
13 aprilie 2012 05:48Moderator
-
26 aprilie 2012 19:19Moderator
Hi Jay,
When a user clicks on a tab for the ribbon it calls the sp.ribbon.js file and that file indicates what css variables to change and what displays. Ultimately if you're looking to display something at a certain stage of the ribbon, you can use IE developer toolbar provided with IE 8 & 9 and find what changes as you switch between tabs and insert what you're looking for into those classes if it's backgrounds.
Gregg
MSFT
- Propus ca răspuns de GreggPJ - MSFTModerator 26 aprilie 2012 19:19
- Marcat ca răspuns de Jay Brooks 26 aprilie 2012 19:28
-
26 aprilie 2012 19:28
Thanks, Gregg. I'll see what I can do with this info!
Jay