Add html elements before adding script