Skip to content

Commit

Permalink
Added button that creates new div
Browse files Browse the repository at this point in the history
  • Loading branch information
gooddaytoday committed May 26, 2022
1 parent fc3cdfd commit 9031e45
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/cypress/setup/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ <h1 class="display-5 fw-bold">Custom jumbotron</h1>
>
Example button
</button>
<button
class="btn btn-primary btn-lg"
type="button"
id="create-div-button"
onclick="window.createDiv()"
>
Create div button
</button>
</div>
</div>

Expand Down Expand Up @@ -166,6 +174,12 @@ <h2>Add borders</h2>
window.clickAbsolute = function () {
console.log(3);
};
window.createDiv = function () {
var div = document.createElement("div");
div.innerHTML = "Later added div";
div.setAttribute("id", "later_added");
document.body.appendChild(div);
};
</script>
<script type="text/javascript" src="./dist/intro.js"></script>
</body>
Expand Down

0 comments on commit 9031e45

Please sign in to comment.