Fix definition() in linked.js (previous commit was wrong)

Hi Mark,

Could you please merge this one. Sorry, my previous patch was incorrect. I have tested this one and it works. It fixes two issue (1) the escaping of css selector is not required anymore since it uses getElementById (2) if the target is not found, it returns the current element so the page will not jump to the top