When clicking on a specific div, I want another div to create a new p style with text in it.
The first function created worked fine- whoever the second one seems to overrule the first one. I've tried changing the names of basically everything but it still seems to overrule. How could I solve this?
var para = document.createElement("P");
para.innerHTML = "The Siamese crocodiles share one stomach, yet they fight over food.";
document.getElementById("information").appendChild(para);
}
window.onload = function() {
document.getElementById("i29").ondblclick = function i29i() {
i29();
}
}
function i3() {
var para = document.createElement("P");
para.innerHTML = "When you climb a good tree, you are given a push.";
document.getElementById("information").appendChild(para);
}
window.onload = function() {
document.getElementById("i3").ondblclick = function i3i() {
i3();
}
}```