I have been trying to add dynamically the modal target attribute to a div using javascript, but both setAttribute() method or append() method won\'t work. Obviously when I write