bootstrap modal working and appending with JS