jQuery plugin is loaded correctly, but does nothing

Well I found the culprit, no solution yet though.
As I said the code ran well on a static HTML page, so I copied the exact static HTML into my theme, leaving all the rest out, and it didn’t work.

So it had to be WordPress related, so I turned off installed plugins one by one and the issue was resolved when I disabled the Crayon plugin.
So now onwards in this direction, will update this answer if I find the cause (tips on how to debug something like this are welcome!).

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)