Click this link.
It works on IE, Firefox, Chrome, Opera. In Safari, location.hash is percent encoded, not work.
var hash = "#" + location.hash.replace(/[^\w]/g, ""); if ($(hash).size()) { ... }
- quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, + quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,