SharePoint 2013: Add text to the Site Actions button using jQuery

The Site Actions button was reduced to an icon without text in SharePoint 2013. If you want the text back you can get it with just a bit of javascript.

Don’t forget to include jQuery first. This is the code, just one line and you’re set:

jQuery(document).ready(function () {
$('.ms-siteactions-root > span > a.ms-core-menu-root').append("<label>Site Actions</label>");
});

Just needs a bit of styling.

.ms-siteactions-root > span > a.ms-core-menu-root {
    width: auto;
}
.ms-siteactions-root > span > a.ms-core-menu-root:hover {
    text-decoration: none;
}
.ms-siteactions-root > span > a.ms-core-menu-root > label {
  margin-left: 5px;
}
.ms-siteactions-imgspan {
    vertical-align: middle;
}

The end result:

Dércia Silva
Posted by Dércia Silva on March 11, 2014

Related articles