Skip to content

Commit

Permalink
new ttile
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulyana0505 committed Oct 1, 2023
1 parent 2b400bf commit 5951601
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<body id="body">
<h1 id="title">Just really bright pink title</h1>
<h2 id="title_2">A little bit less pink title</h2>
<button onclick="newTitle()">Do you want a new title?</button>
<br>
<p class="text-for-hiding">Hello! I want to make this page as pink as I can. And also I want to do some cool stuff. And yeah, if you were in this page before you know that after 5 sec you'll see the window with a question. BUT now it's sleepng. So don't wait for it
</p>
<button class="hiding-button">Try to click</button>
Expand Down
12 changes: 9 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ function removeMessage() {
// the part for messages ended

//buton with seconds

function addSecondsToList(text) {
const listItem = document.createElement('li');
listItem.innerText = text;
Expand All @@ -124,7 +123,14 @@ function buttonSeconds() {
const secUntilTomorrow = (secInDay - secPass) + ' ' + 'seconds';

addSecondsToList(secUntilTomorrow);
}
// button with seeconds end

// console.log(secUntilTomorrow);
//new title (as user want)
function newTitle() {
const inputNewTitle = prompt('Enter a few words');
const newTitle = document.querySelector('#title');

}
newTitle.innerText = inputNewTitle;
}
// end of new title

0 comments on commit 5951601

Please sign in to comment.