Skip to content

Commit 9031e45

Browse files
committed
Added button that creates new div
1 parent fc3cdfd commit 9031e45

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/cypress/setup/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,14 @@ <h1 class="display-5 fw-bold">Custom jumbotron</h1>
9393
>
9494
Example button
9595
</button>
96+
<button
97+
class="btn btn-primary btn-lg"
98+
type="button"
99+
id="create-div-button"
100+
onclick="window.createDiv()"
101+
>
102+
Create div button
103+
</button>
96104
</div>
97105
</div>
98106

@@ -166,6 +174,12 @@ <h2>Add borders</h2>
166174
window.clickAbsolute = function () {
167175
console.log(3);
168176
};
177+
window.createDiv = function () {
178+
var div = document.createElement("div");
179+
div.innerHTML = "Later added div";
180+
div.setAttribute("id", "later_added");
181+
document.body.appendChild(div);
182+
};
169183
</script>
170184
<script type="text/javascript" src="./dist/intro.js"></script>
171185
</body>

0 commit comments

Comments
 (0)