#RichDevTips ...content is what matters

2016-04-25

Hiding the Sharepoint 2013 ribbon / navigation bar using JQuery


Command:
Hide      $('#globalNavBox').hide();
Show    $('#globalNavBox').show();

Example:
<script type="text/javascript">
$( document ).ready(function() {
                               $('#globalNavBox').hide();
});
</script>

Happy coding

2016-04-19

Hiding 'Browse', 'Edit' and 'Page' tab on Sharepoint 2013 ribbon using JQuery





***Always use \\. to escape . character as JQuery does not allows it as a selector***


Hide:
Page       $('#Ribbon\\.WebPartPage-title').hide();
Edit        $('#Ribbon\\.ListForm.Edit-title').hide();
Browse   $('#Ribbon\\.Read-title').hide();

Show:
Page       $('#Ribbon\\.WebPartPage-title') .show();
Edit        $('#Ribbon\\.ListForm.Edit-title') .show();
Browse   $('#Ribbon\\.Read-title') .show();

Example:
<script type="text/javascript">
$( document ).ready(function() {
              $('#Ribbon\\.WebPartPage-title').hide();
});
</script>

Happy coding

Hello World!

Hello everyone! My name is Marco, I’m a SharePoint consultant/specialist and I'm officially opening my blog to the world and starting to post relevant things about the .NET and SharePoint development world. Because I have limited time, I’ll not focus on stylize the page at this moment, I rather prefer to post new content because this is what matters. Content! :)