- Go to jquery.com and download the latest jQuery library to your desktop. You want to get the compressed production version, not the development version.
- Open SharePoint Designer (SPD) and connect to the root level of your site's site collection.
- In SPD, open the "Style Library" folder.
- Create a folder named "Scripts" inside of the Style Library.
- Drag the jQuery library JavaScript file from your desktop into the Scripts folder.
- In the Scripts folder, create a new JavaScript file and name it (e.g. "actions.js").
- Open your master page file in SPD.
- Within the <head> tag of the master page, add a script reference to the jQuery library just above the content place holder named "PlaceHolderAdditonalPageHead" (and above your custom CSS references, if applicable) as follows:<script src="/Style%20Library/Scripts/{jquery library file}.js" type="text/javascript"></script>
- Immediately after the jQuery library reference add a script reference to your custom scripts file as follows:<script src="/Style%20Library/Scripts/actions.js" type="text/javascript"></script>
Wednesday, August 15, 2012
Link to JQuery Library
Wednesday, August 8, 2012
Hide First Tab in SharePoint 2010 Navigation and Comment & Rating
I created a blog post on this for SharePoint 2007 HERE: But SharePoint 2010 is a bit more complex. Since it uses UL’s and Li’s for it’s navigation it is a bit harder to hide just one element.
You will notice that the Home tab actually is the first node and then has a child UL which represents the rest of the navigation Items. So the approach is to hide the first <li> <a> (display: none) and then simply just use (display:block ) to show the hidden <ul> <li> <a> tags.
Here is the CSS you could use to hide just the first node (home) tab in a SharePoint 2010 application:
.s4-tn li.static > a{
display: none !important;
}
.s4-tn li.static > ul a{
display: block !important;
}
display: none !important;
}
.s4-tn li.static > ul a{
display: block !important;
}
As well as, if you want to remove "Comment and Rating" as shown below, please add the following code.
.s4-socialdata-notif
{
display: none !important;
}
{
display: none !important;
}
Subscribe to:
Comments (Atom)