JQuery and Seamless Play

andrew-robertson
Community Member Posts: 319 ♦ Idol ♦
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: 665 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: 44 ☆ Superstar ☆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
- 35.8K All Categories
- 109 ✫ Announcements
- 33.1K Lectora®
- 31.1K Lectora Discussions
- 28.9K Lectora Desktop
- 2K Lectora Online
- 2K Lectora Feature Requests
- 71 Lectora User Groups
- 36 Lectora Accessibility User Group (LAUG)
- 22 ELB Learning Content
- 22 ELB Learning Content Discussions
- 321 CenarioVR®
- 188 CenarioVR Discussions
- 133 CenarioVR Feature Requests
- 41 Rockstar Learning Platform®
- 38 Rockstar Learning Platform Discussions
- 108 CourseMill®
- 108 CourseMill Discussions
- 47 ReviewLink®
- 47 ReviewLink Discussions
- 5 The Training Arcade®
- 5 The Training Arcade Discussions
- 934 All Things eLearning
- 36 eLearning Development
- 546 Learning Management System (LMS) Integration
- 332 Web Accessibility
- 1.2K ♪ The Green Room
- 9 Additional Learning Products