Use javascript to add anchor class