honestly I don't know. I'm not a JS expert and just copy&pasted it from the function below ($('#externalStorage').on('click', 'td.remove>img', function()). Any reasons why $() shouldn't be there?