Skip to content

Commit

Permalink
Mengatasi error(js & html) dan sudah selesai
Browse files Browse the repository at this point in the history
  • Loading branch information
HaykalRadiandra committed Aug 3, 2022
1 parent f31556b commit 6aee489
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions assets/Storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function showHistory() {
function renderHistory() {
const historyData = showHistory();
let historyList = document.querySelector("#historyList");
historyList.innerHTML = "";
historyList.innerHTML="";

for (let history of historyData) {
let row = document.createElement('tr');
Expand All @@ -46,5 +46,5 @@ function renderHistory() {
historyList.appendChild(row);
}
}

renderHistory();
4 changes: 2 additions & 2 deletions assets/kalkulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ function performCalculation() {
putHistory(history);
calculator.displayNumber = result;
renderHistory();
}

}
const buttons = document.querySelectorAll('.button');
for (const button of buttons) {
button.addEventListener('click', function (event) {
Expand Down
10 changes: 9 additions & 1 deletion assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,15 @@
text-shadow: 2px 2px 4px white;
}

@media screen and (max-width: 992px) {
@media screen and (max-width: 513px) {

/* .button {
padding: 10px;
}
.history {
width: 100%;
} */

.card {
padding: 15px;
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h2>Riwayat Perhitungan</h2>
<th>Hasil</th>
</tr>
</thead>
<tbody class="historyList"></tbody>
<tbody id="historyList"></tbody>
</table>

</div>
Expand Down

1 comment on commit 6aee489

@vercel
Copy link

@vercel vercel bot commented on 6aee489 Apr 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.