capturing code from div