I added a custom script to my "Style Library" folder under a site collection , the. The site collection urlURL is as follow http://servername/HR
. soSo to reference the script inside my master page iI wrote the following :-
<script type="text/javascript" src="/hr/Style%20Library/Custom JS/HideTreeViewFolder.js" ></script>
where iWhere I am manually referencing the /hr/
in sideinside the src
, so can iI make this more dynamic and get the site collection urlURL dynamically, so if iI move the site collection to another URL the script will still get referenced ?