JavaScript and UIPath inject, How to use JQuery in chrome

please help me to use JQuery in chrome.
i used this code but it is not working form me in chrome.

var head = document.getElementsByTagName(“head”)[0];
var script = document.createElement(“script”);
script.src = “//ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js”;
script.onload = function() {
debugger;
document.activeElement.value=parameter;
var ElementID= $(this).attr(‘id’);

};
head.appendChild(script);
}

it’s showing $ not found

please any one can help me on this. @vvaidya

Did you ever solve this issue, I have run into it as well.

This solution may be ugly but it may work for you, copy all code from https://code.jquery.com/jquery-3.4.1.slim.min.js before your code and try to inject.