Explore the community Forums Lectora Lectora Questions & Answers how to apply javaScript to text box/objects? Reply To: how to apply javaScript to text box/objects?

#411942 Score: 0
Profile photo of approg
curious george
wise owl
friend finder
picture perfect
22 pts

The latest version of jQuery released in 2016 is version 3.1. DO you really want to use a 5+ year old of jQuery?

There’s no easy way to know what the identifier of Lectora element is. What I’ve started doing is what someone here suggested ie. add a custom CSS class name to the element (within Lectora 17) and then in my JavaScript I refer to it with

getDisplayDocument().querySelector(“.my custom CSS class name here”);

Having said that the JavaScript that Lectora uses is not well documented and not guaranteed to not change from version to version.