Created
July 22, 2022 18:27
-
-
Save vvmk/34dc40f156878c8fc12b18d18482cce7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // set these three first | |
| // intended for use with sr-only class found here https://gist.github.com/ffoodd/000b59f431e3e64e4ce1a24d5bb36034 | |
| let targetClass = 'jkit-video-popup-btn'; | |
| let linkText = 'play video'; | |
| let classList = 'sr-only'; | |
| let childSpan = document.createElement('span'); | |
| childSpan.innerHTML = linkText; | |
| childSpan.className = classList; | |
| let parentLink = document.getElementsByClassName(targetClass)[0]; | |
| parentLink.appendChild(childSpan); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment