About Me
now i want that when i click to the button it switch from btnAbt(id) to newAbt(id) using js event but the code is written using tailwind css. page size should be same only switch to other page while clicking on the button.
i tried to do–>
function aboutButton(){
<code>let target = document.querySelector("#btnAbt");
target.classList.toggle("newAbt");
</code>
<code>let target = document.querySelector("#btnAbt");
target.classList.toggle("newAbt");
</code>
let target = document.querySelector("#btnAbt");
target.classList.toggle("newAbt");
}
target.addEventListener(‘click’,aboutButton);
and added a new div in the same file
New contributor
Diksha Varshney is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.