I have the following script in an HTML Element:
var inp = $(‘input[placeholder=“togglePixel”]’)
inp.val(“hello”);
inp.addEventListener(“onfocus”, myfunc);
function myfunc() {
}
When I load the page, the code up to and including inp.val(“hello”); executes, but the addEventListener stops the code.
Any thoughts on how to fix this?
Thanks in advance!