Programmatically change Background Colour?

ewalsh-3688
Community Member Posts: 23 ☆ Roadie ☆
Hi Lectora Online Rockstars 🎸,
Does anyone know if it is possible to change the background colour of a title programmatically using an action or JavaScript? I'd like to be able to offer an option of changing the background colour to support learners who may have Dyslexia.
It looks like someone asked a similar question in 2009 but there were no responses 🙁 https://rockstars.elearningbrothers.com/discussion/271244/accessibility-issues
Thanks in advance 🙂
Does anyone know if it is possible to change the background colour of a title programmatically using an action or JavaScript? I'd like to be able to offer an option of changing the background colour to support learners who may have Dyslexia.
It looks like someone asked a similar question in 2009 but there were no responses 🙁 https://rockstars.elearningbrothers.com/discussion/271244/accessibility-issues
Thanks in advance 🙂
Tagged:
Comments
-
Hello. For a published course with a simple background, the tag background controls the color. You can add the following code to a button or item to change the CSS for the page's background color. You could create a button or other object with an action on it. For example, a button with a "On Mouse Click" trigger, and an action to "Run Javascript". Then place this code in the javascript box:
triv$( 'body', getDisplayDocument() ).css("background-color","red");
You can change the "red" to any valid CSS color, or use rgb() function in double quotes:
triv$( 'body', getDisplayDocument() ).css("background-color","rgb(0,0,255)");.
You could also change a background image with code like this on the "background-image" property.
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
- 7 The Training Arcade®
- 7 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