Skip to content

Commit

Permalink
split added
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-shuhailo committed Jan 18, 2024
1 parent 89305a5 commit ac07654
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,17 @@ inputs.forEach(input => {
label.textContent = labelName;
label.setAttribute('for', labelFor);

if (label.textContent.includes('Name')) {
label.textContent = label.textContent.replace('Name', ' name');
}

input.after(label);

input.placeholder = labelName
.slice(0, 1)
.toUpperCase() + labelName.slice(1);

if (input.placeholder.includes('Name')) {
input.placeholder = input.placeholder.replace('Name', ' Name');
}
});

0 comments on commit ac07654

Please sign in to comment.