Custom jquery - Seamless play

Answers
-
Take a look at this, it may help while waiting for an answer.
JQuery and Seamless Play — ROCKSTARS Community (elearningbrothers.com)
Containing your containers: Custom JavaScript Suggestions for Lectora Online (elblearning.com)
Andrew R.
Developing content since 2010 using a mixed bag of tools. -
chrystalb21 Community Member, Lectora® Accessibility Group (LAUG) Member, eLearning Brothers® Partner Posts: 31 ✶ Headliner ✶
Hi Andrew,
That didn't work for me. I'm guessing they way it's handled is different since 2015. For the jquery function for getDisplayWindow, triv$(getDisplayWindow()).find('p').css('background-color','red'); works for me when testing, but it looks like none of the other functions listed in the reference is available.
Any ideas?
I'll also need to use something like the getCurrentPageID because for normal publish, the ID is pageDIV, but not for seamless.
-
From my experience, it is still relative. The group here on the forum helped me create the following code that I use to dynamically get the ID of an object based on the CSS class. It helps when trying to do advanced JavaScript work.
//Gets the item's ID using the class name. function getIdFromClass(_classIn){ let uniqueID = triv$(_classIn, getDisplayDocument()).first().attr("id"); return uniqueID; }
Are you remembering to add the triv$ in front of any/all JavaScript you are using (of course unless you including your own version of JQuery manually)? Do you have sample code available that you are trying to use?
Andrew R.
Developing content since 2010 using a mixed bag of tools. -
chrystalb21 Community Member, Lectora® Accessibility Group (LAUG) Member, eLearning Brothers® Partner Posts: 31 ✶ Headliner ✶
Hi Andrew,
I've actually got all of my code written and working when not publishing with seamless, but have to rewrite to use Lectora's JQuery because publishing to seamless puts my code in the wrong place to access the page objects. Side note, the only reason I'm doing this is because I only need to publish with seamless since we have audio that is set for autoplay. Unless it is published with seamless, Firefox and mobile delivery has tap/click to continue prompt on every page. If anyone has a solution for non-seamless publish, that would be the best, then no rewriting would be needed.
I'm not having a problem using the same type of code you are using to access the items on the page itself, but I need to access the containing div (which is the pageDIV in non-seamless publishing, and a unique page number with seamless.
The following does work when not published with seamless.
triv$("#pageDIV").addClass("maindiv");
The div I'm trying to target with seamless does have a class of .pageDIV, but using the following does not work.
triv$(".pageDIV").addClass("maindiv");
-
chrystalb21 Community Member, Lectora® Accessibility Group (LAUG) Member, eLearning Brothers® Partner Posts: 31 ✶ Headliner ✶
Categories
- 35.9K All Categories
- 109 ✫ Announcements
- 33.1K Lectora®
- 31.1K Lectora Discussions
- 29K Lectora Desktop
- 2K Lectora Online
- 2K Lectora Feature Requests
- 71 Lectora User Groups
- 36 Lectora Accessibility User Group (LAUG)
- 25 ELB Learning Content
- 25 ELB Learning Content Discussions
- 328 CenarioVR®
- 195 CenarioVR Discussions
- 133 CenarioVR Feature Requests
- 42 Rockstar Learning Platform®
- 39 Rockstar Learning Platform Discussions
- 108 CourseMill®
- 108 CourseMill Discussions
- 47 ReviewLink®
- 47 ReviewLink Discussions
- 7 The Training Arcade®
- 7 The Training Arcade Discussions
- 936 All Things eLearning
- 37 eLearning Development
- 546 Learning Management System (LMS) Integration
- 333 Web Accessibility
- 1.2K ♪ The Green Room
- 9 Additional Learning Products