Explore the community Forums Lectora Lectora Questions & Answers does jQuery work in Lectora v17.1.1?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #383885 Score: 0
    Profile photo of Ann Sisco
    Ann Sisco
    Member
    beginner
    intermediate
    friend finder
    wise owl
    curious george
    contributor
    profile
    picture perfect
    8 pts
    @prg1792

    Not even sure how to fully explain this, but I cannot get jQuery code to work in v17.1.1. Has anyone else been able to?

    I have a title that I built in v17.0.6 that includes the jquery-1.11.1.min.js library and some simple code on each page (at the title level). Now published in 17.1.1, each page fails on the first jQuery statement, $(document).ready, which throws an “object expected” error.

    After some searches, I read that this may be caused by a jQuery.noConflict(). Sure enough, the latest version of trivantis.js has a line “if (window.jQuery) triv$ = jQuery.noConflict(true)”, which is executed on every page. I tried replacing “$” in my code with “triv$” – this eliminates the error but does not execute the code.

    I also noticed:

    • Pages with the default media player now have jquery-1.10.2.min.js included.
    • triv$ is used in trivantis.js and in trivantis-media.js.

    Has anyone successfully added jQuery code to v17.1.1?

    #383951 Score: 0
    Profile photo of Math Notermans
    Math Notermans
    Member
    contributor
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    LUC16 Attendee
    LUC16
    wise owl
    curious george
    129 pts
    @mnotermans5114

    I have deliberately not upgraded to v17.1.1 because of the many issues i read here with it. Still at  v17.0.6, and do think that was wise…

    #383971 Score: 0
    Profile photo of CarlFink
    CarlFink
    Member
    beginner
    intermediate
    contributor
    LUC16 Attendee
    wise owl
    curious george
    advanced
    friend finder
    40 pts
    @CarlFink

    You can edit Trivantis.js if want and just remove that test ….

    #383983 Score: 0
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    354 pts
    @timk

    You can “Run javascript” on title level:

    $ = triv$.noConflict();

     

    #383993 Score: 0
    Profile photo of Ann Sisco
    Ann Sisco
    Member
    beginner
    intermediate
    friend finder
    wise owl
    curious george
    contributor
    profile
    picture perfect
    8 pts
    @prg1792

    @timk, Thanks, that works!

    @carlfink, I tried that but got errors loading pages that have the media player.

    @Math, I was hoping 17.1.1 would resolve some issues I have in 17.0.6, but like many, I have found more issues instead of less. I’m writing jQuery code to see if i can resolve some of the issues I’m running into.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.