JQuery and Seamless Play

andrew-robertson
Community Member Posts: 277 ☆ Superstar ☆
Good afternoon - I have a quick question. My colleague figured out a quick and simple way to obtain the unique ID of an object based on the the class name as shown below.
triv$(".tmpbutton").first().attr("id")
While this works fine, it doesn't work when we publish the content using the Publish for Seamless Play enabled. Is there a way to make it work when that is enabled?
triv$(".tmpbutton").first().attr("id")
While this works fine, it doesn't work when we publish the content using the Publish for Seamless Play enabled. Is there a way to make it work when that is enabled?
Andrew R.
Developing content since 2010 using a mixed bag of tools.
Developing content since 2010 using a mixed bag of tools.
Best Answers
-
wheels Florida USACommunity Member, Administrator, Moderator, Rockstar Manager Posts: 642 eLearning ROCKSTAR Admin TeamGive this a try:
triv$(".tmpbutton", GetDisplayDocument()).first().attr("id")
Learn more here:
https://knowledgebase.elblearning.com/containing-your-containers-custom-javascript-suggestions-for-lectora-online
Note: PascalCase only in older version of Lectora Desktop, PascalCase and camelCase in new versions of each product. -
Thanks @wheels , that snippet helped get me to the point of making it work, only a minor modification...
triv$(".tmpbutton", getDisplayDocument()).first().attr("id");
GetDisplayDocument() >> getDisplayDocument()
Not to mention that link you passed along, I hope that will make my life easier - I am not a master at Java/CSS/HTML, but I do know enough to make myself dangerous. Appreciate your time as always.Andrew R.
Developing content since 2010 using a mixed bag of tools.
Answers
-
susanmacnab Community Member, Lectora® Accessibility Group (LAUG) Member, eLearning Brothers® Partner Posts: 30 ✶ Headliner ✶Hi @wheels, thanks for the link to the document. I'll be saving for future use as well.
I'm curious about the code snippit that you shared. I've never seen a second parameter to jquery like that and can't find any info in jquery documentation. Is this an enhancement that was added on by Lectora?
Categories
- 4.8K All Categories
- 6 New Feature Releases
- The Training Arcade®
- Arcades™
- 125 ✫ Announcements
- 9 ✪ Contests
- 34.1K eLearning Brothers® Products
- 33.6K Lectora®
- 31.6K Lectora Discussions
- 1.9K Lectora Feature Requests
- 71 Lectora User Groups
- 17 Asset Library
- 10 AssetLibrary Discussions
- 7 AssetLibrary Feature Requests
- 305 CenarioVR®
- 179 CenarioVR Discussions
- 126 CenarioVR Feature Requests
- 40 Rockstar Learning Platform®
- 28 Rockstar Learning Platform Discussions
- 12 Rockstar Learning Platform Feature Requests
- 4 Off-the-Shelf Course Library
- 3 Off-the-Shelf Course Library Discussions
- 1 Off-the-Shelf Course Library Feature Requests
- 114 CourseMill®
- 107 CourseMill Discussions
- 44 ReviewLink®
- 32 ReviewLink Discussions
- 12 ReviewLink Suggestions
- 2 The Training Arcade®
- 1 The Training Arcade Discussions
- 1 The Training Arcade Feature Requests
- 10 Additional Learning Products
- 2 Adobe®
- 4 Articulate®
- 2 Camtasia®
- Docebo®
- 1 iSpring®
- 1 Microsoft® PowerPoint®
- 932 All Things eLearning
- 5 Course Development Showcase
- 1 eLearning Brothers® Downloads
- 1 Compliance Training
- 11 eLearning Development
- eLearning Game Design
- 7 Instructional Design
- 545 Learning Management System (LMS) Integration
- 3 Mobile Learning
- 22 Visual Design
- 331 Web Accessibility
- 1.2K ♪ The Green Room
- 8 ♡ Community Feedback
- 7 Community Tips