On any Wiki-Page I have created a DIV:

<div id="content">This is the content which should be displayed on another site<br/></div>

Now, I would like to display this DIV on the Wiki Homepage. I have tried using following jQuery:

<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js"></script>
$("#content").load("https://mySharePoint/LinkToPageWhereDIVis.aspx #content");

However it doesn't display anything yet.

Is it maybe a wrong approach? If so, is there any workaround? Or is there any configuration setting in SharePoint which doesn't allow to display the DIV on another .aspx-Page?

I am using SharePoint 2013 on-premise.


Try using below code:

<script src="jquery-3.3.1.min.js"></script>
$("#content").load("ajax/mySharePoint/LinkToPageWhereDIVis.aspx #content");


  • Thanks for your answer. Unfortunately it doesn't work yet adding "ajax" before the url. Did it work for you with this code? If so, then I think I have any configuration problem.
    – SteffPoint
    Oct 5 '18 at 7:42
  • If you have added that content div in a html page, then try to refer to that html page link: $("#content").load("ajax/SiteAssets/HTML/Test.html #content"); Oct 5 '18 at 9:55
  • It is a Wiki-Page (based on Wiki-Page-Library App) with .aspx ending. The URL to that wiki page is: mySharePoint/minimal/05001/test/TestWiki%20fr%20Dokumentation/Skript%20Dokumentenexport%20von%20Polarion%20nach%20SharePoint.aspx
    – SteffPoint
    Oct 5 '18 at 10:35
  • Have you added any CEWP in Wiki-Page referencing html file in CEWP? Oct 5 '18 at 10:40
  • I have used the edit source code functionality - so the solution without any webparts. But I can change it if you recommend me to do it this way. On the page, where I want to display the DIV I have used a script editor webpart.
    – SteffPoint
    Oct 5 '18 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.