Skip to content

Commit

Permalink
Merge pull request #47 from Ambikesh88/master
Browse files Browse the repository at this point in the history
Delete button added
  • Loading branch information
swapnilsparsh authored Oct 4, 2021
2 parents bf230a4 + 2a28825 commit 76b5af3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions 08 - Number Counter/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,16 @@ <h3 class = "heading">Number Counter</h3>
<div class = "button">
<div class = "save">Save</div>
</div>

<div class="button">
<div class="deleted">Delete</div>
</div>
</div>
<div class = "right">
<div class = "heading">Numbers saved:</div>
<div class = "number"></div>
</div>

</div>


Expand Down
7 changes: 7 additions & 0 deletions 08 - Number Counter/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const increase = document.querySelector('.increase');
const decrease = document.querySelector('.decrease');
const reset = document.querySelector('.reset');
const save = document.querySelector('.save');
const deleted = document.querySelector('.deleted');

let count = 0;
increase.addEventListener('click', () => {
Expand All @@ -25,3 +26,9 @@ save.addEventListener('click', () => {
num.innerHTML = count;
number.appendChild(num);
});

deleted.addEventListener('click',()=>{
const number = document.querySelector('.number');
number.innerHTML='';

})
2 changes: 1 addition & 1 deletion 08 - Number Counter/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ footer a:visited {
justify-content: center;
}

.reset, .save {
.reset, .save ,.deleted {
cursor: pointer;
color: white;
padding: 20px;
Expand Down

0 comments on commit 76b5af3

Please sign in to comment.