How to achieve clicking on subsite logo to root site home page using CSOM in SharePoint Online?

Hello SharePointers,

In this blog, we will talk about the most interesting functionality to redirect parent root site on clicking site logo on the sub site. By default , by clicking site logo on sub site will take you to parent site.

Below is the script to be placed in subsite master page to achieve the desired functionality.

script src=”//code.jquery.com/jquery-3.1.0.min.js” type=”text/javascript”>
<script type=”text/javascript”>
$(function () {
$(“#DeltaSiteLogo a”).attr(“href”,”http://mytest/”);
});
</script>

Happy SharePointing!!

Leave a Reply

Your email address will not be published.