Add a close/hide button to support ribbon plugin?
-
What about the option of displaying a hide/close button like [x] or something like that above the ribbon?
May you consider adding this feature to the plugin core?
This way even big sized ribbons or adverts can be closed by the user if they collide with the content on lets say full-width pages and stuff.
Quick hack:
If you add this javascript code to the theme template or the custom html widget, the ribbon gets closed when the user clicks somewhere on the website except the ribbon area.
<script> window.onload = function(){ var hideribbon = document.getElementById('INSERT_NAME_OF_YOUR_RIBBON_DIV'); document.onclick = function(e){ if(e.target.id !== 'INSERT_NAME_OF_YOUR_RIBBON_DIV'){ hideribbon.style.display = 'none'; } }; }; </script>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Add a close/hide button to support ribbon plugin?’ is closed to new replies.