Update js to cache selectors