I currently have a tag that looks like this:
<input name="code" type="text" />
I wish to leverage JQuery to add text inside this tag e.g.
<input name="code" type="text" data-hj-whitelist />
The reason for this is Hotjar whitelisting with the data-hj-whitelist addition.
This is my current code, which I am aware will not work as I'm adding a class of which data-hj-whitelist is not. Other functions that sprung to mind e.g. add, append etc, add after the tag is closed. I need to add text inside the tag itself.
//WordPress Format
jQuery(document).ready(function( $ ) {
//Obviously won't work as I'm not adding a class
$('input').addClass('colin');
//Console log to know the script fired
console.log('fired');
});