0

I have a standard web part page and am reading items from a list and then displaying then under jquery tabs. I have downloaded the jquery UI (minified) and placed them in the site assets library of the site collection.

I have added a ref to the jquery UI files via script tags in the body of the html and called the html file using a content editor webpart.

The issue I am having is the jquery UI files do not download the first time the page is executed. Therefore the content is not rendered properly and no tabs are present. If I hit F5 to refresh after the page has loaded the page works fine however if I click on the nav menu on the left hand side (OTB nav) the Juery UI seems to load after the page is full executed and therefore this issue has comeback.

I have been told not to change the masterpage and therefore cannot add ref's to the jquery ui from there. Does anyone have any suggestions to resolve this.

  • Did you get any errors in Browser console when the jQuery UI is not loaded? – sekhar Sep 11 '15 at 13:24
  • 3
    Version of SharePoint? This sounds like the minimal download strategy in play, but we need to know if you are on 2013. – Eric Alexander Sep 11 '15 at 13:24
  • Eric I have just verified and the "minimal download strategy" has not been activated. I am using Sharepoint 2013 online (o365). – Miyagi Sep 15 '15 at 8:29
1

it is essential for jquery ui that it is loaded AFTER jquery. In my experience in most cases this is the problem.

To load your scripts at a specific time, try this approach: http://josharepoint.com/2015/06/16/custom-javascript-function-loaded-after-the-ui-has-loaded-in-sharepoint-2013/

ExecuteOrDelayUntilScriptLoaded could help you combined with lazy loading a script.

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.