moved js inside div tag