attach element to opts