ReviewLink Blocking jQuery; Worked Previously

msullivan3430
msullivan3430 Community Member Posts: 42
I have a project that works fine in Run mode, but when I upload it to ReviewLink none of the jQuery functions. The previous version that was uploaded one month ago had no problems. Has anyone experienced this?

I'm currently linking to jQuery immediately below the title icon and inheriting this on all pages:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

Thanks in advance for any ideas!

Maura

Comments

  • zliquorman1276
    zliquorman1276 Community Member Posts: 67 ☆ Roadie ☆
    Do you have the script inside an HTML object in the project? (that's what it sounds like from your description I just want to be sure)

    If you do, then could you upload a sample? I can take a look and see what I can find.

    If all else fails, you can always download the JQuery library and include it in your project files as well.
  • msullivan3430
    msullivan3430 Community Member Posts: 42
    I've attached a file with most of the pages removed. jQuery still works in Run, but not on ReviewLink.

    Thanks!
  • zliquorman1276
    zliquorman1276 Community Member Posts: 67 ☆ Roadie ☆
    Turn off Publish for Seamless Play under the HTML Options tab when you're publishing.

    This is one feature that has been broken for a while, and completely messes with any custom Javascript you've added. Worked fine after I disabled it. :)
  • msullivan3430
    msullivan3430 Community Member Posts: 42
    Great, that worked! I really appreciate the help.

    Any idea how to speed up the page load so it doesn't flash on ReviewLink? I assume this will be an issue when launching from an LMS as well.

     
  • zliquorman1276
    zliquorman1276 Community Member Posts: 67 ☆ Roadie ☆
    No problem, glad to have been of help!

    That "flash" is characteristic of loading HTML pages from the same window. Unfortunately, that's what seamless play was intended to fix. And when you don't need custom JS in your content, it works fine... usually.

    There are some things you can try yourself however. The simplest thing is to try setting the background for the whole document.

    CSS
    body {
    background: #EDEBED url(myGrayBackgroundImage.jpg);
    }
    You could also try hiding certain elements until the page fully loads to avoid the "flash" that appears before they load. I found a really old project where I tried this. I'm pretty sure the code idea came from StackOverflow or something :p

    Anyway, doing this on elements that are loaded on top of your background images/banners/whatever will prevent them from appearing before the background is present. If this is used on elements that occur in the same location on each slide (such as a banner logo image), this will leave you with a "blink" effect where the element disappears briefly, then reappears. It's a different solution to an even more minute problem, but here it is:

    HTML:
    <!-- Add a class to flag once the page is fully loaded -->
    <body onload="document.body.classList.add('loaded')">
    CSS:
    /* Hides specified element ID until page is fully loaded*/
    body:not(.loaded) #element img {
    display:none;
    }