Microsoft Technology, .Net, BizTalk, Sharepoint & etc.

Liedong(Ken) Zheng, Senior SharePoint Developer at SIMPLOT

Replace Global Links In SharePoint Using JQuery

Posted by ken zheng on February 4, 2009

Below is the JQuery Script to replace the first link of Global Breadcrumbs and you can replace text as well

<script type="text/javascript">
$(document).ready(function(){

//To replace the Global Breadcrumbs
$("#ctl00_PlaceHolderGlobalNavigation_PlaceHolderGlobalNavigationSiteMap_GlobalNavigationSiteMap").children(":first").children(":first").attr("innerText","SimCentral");

$("#ctl00_PlaceHolderGlobalNavigation_PlaceHolderGlobalNavigationSiteMap_GlobalNavigationSiteMap").children(":first").children(":first").attr("href","http://hotmail.com");

//To hide the Global Breadcrumbs
//$("#ctl00_PlaceHolderGlobalNavigation_PlaceHolderGlobalNavigationSiteMap_GlobalNavigationSiteMap").css({display:'none'});
});

</script>

One Response to “Replace Global Links In SharePoint Using JQuery”

  1. Matthew said

    Brilliant! Thanks so much :)

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>