Function for populating a div with links