Skip to content

Commit f1cf47a

Browse files
committed
update
1 parent e4ca285 commit f1cf47a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lorem-ipsum-generator/script.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const copyBtn = document.querySelector('#copy-btn');
99
const form = document.querySelector('#form');
1010
const outputContainer = document.querySelector('.output-container');
1111
const para = document.querySelector('#para-input');
12+
const generateBtn = document.querySelector('#generate-btn');
1213

1314
document.body.onload = (e) => {
1415
for (let i = 1; i <= 3; i++) {
@@ -28,7 +29,14 @@ form.onsubmit = (e) => {
2829
}
2930
outputContainer.innerHTML += `<div class='output-para'>${text[index]}</div>`;
3031
}
32+
generateBtn.textContent = 'Generated';
33+
setTimeout(() => {
34+
generateBtn.textContent = 'Generate';
35+
}, 3000);
3136
copyBtn.textContent = 'Copy to Clipboard';
37+
copyBtn.scrollIntoView({
38+
behavior: "smooth"
39+
});
3240
}
3341

3442
copyBtn.addEventListener('click', async (e) => {

0 commit comments

Comments
 (0)