Skip to content

Commit

Permalink
bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
kamranzafar4343 committed Feb 3, 2024
1 parent 3b7b1fa commit f865b45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<body>


<script src="script.js"></script>

<h1>Image search app</h1>

<form action="">
Expand Down Expand Up @@ -37,6 +37,8 @@ <h1>Image search app</h1>
<button id="more-button">
Show More
</button>


<!--i was getting errors for using it on the top of body but solved when used at last<script> -->
<script src="script.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ async function searchImages() {
}


formEl.addEventListener("submit", (event)=>{
formEl.addEventListener("submit", (event) => {
event.preventDefault();
page = 1;
searchImages();
})

showMore.addEventListener("click", ()=>{
showMore.addEventListener("click", () => {
searchImages();
})

0 comments on commit f865b45

Please sign in to comment.