Speed up and support some browser.

Change some selector and refine code.