I changed the plugins code. I changed
$buffer = str_replace('</head>', $headJS . "\n</head>", $buffer);
to
$buffer = str_replace('</title>', "</title>\n" . $headJS, $buffer);
You also need to wrap the JavaScript code that’s inside your head tag like this,
head.ready(function() {
$("#my").jquery_plugin();
});
Why do we even need this plugin? It’s just a copy of another plugin.