본문 바로가기
SharePoint Designer

로고 클릭 시 메인 페이지로 이동하기

by [김경민]™ ┌(  ̄∇ ̄)┘™ 2013. 12. 24.
728x90

[출처] http://stackoverflow.com/questions/13582710/sharepoint-redirect-site-logo-link-to-the-root-site-collection-home-page


SharePoint Redirect site logo link to the root site collection home page

 

//read old link id

var oldLogoId = $("#DeltaSiteLogo > a").attr('id');

//change the id

$("#" + oldLogoId).attr('id','CustomSiteLogo');

//create dummy hidden element

$("#DeltaSiteLogo > a").after("<a id='tmpDeltaSiteLogo' href='#' style='display:none'>Dummy</a>");

//set the dummy id with old id value

$("#tmpDeltaSiteLogo").attr("id",oldLogoId );

//alter the link to point to the webroot 

$("#CustomSiteLogo").attr('href', window.location.protocol + "//"  + window.location.host);



728x90

댓글