Uncaught TypeError: Cannot read property ‘querySelector’ of null
This error occured, because your jquery file is loaded at the top of page, and your element is not loaded yet.
So jquery cannot find element by querySelector.
You have to fix this problem with loading jquery at the foot of file