VinithaNarayanan2020 / Myproject

0 stars 0 forks source link

Use classes for style manipulations. #4

Open KarthikaRamachandran opened 5 months ago

KarthikaRamachandran commented 5 months ago

In the line number 265 and 390, we are using <element>.style.display = "none"; , we can define CSS classes to handle and add/remove class accordingly in JS.

CSS Class:

.h-dnone{
display: none;
}
.h-dblock{
display: block;
}

JS:

ele.classList.add("h-dnone");

(or)

ele.classList.add("h-dblock");
VinithaNarayanan2020 commented 5 months ago

Done

On Fri, 21 Jun 2024, 12:01 Karthika Ramachandran, @.***> wrote:

In the line number 265 and 390, we are using .style.display = "none"; , we can define CSS classes to handle and add/remove class accordingly in JS.

CSS Class:

.h-dnone{ display: none; } .h-dblock{ display: block; }

JS:

ele.classList.add("h-dnone");

(or)

ele.classList.add("h-dblock");

— Reply to this email directly, view it on GitHub https://github.com/VinithaNarayanan2020/Myproject/issues/4, or unsubscribe https://github.com/notifications/unsubscribe-auth/A47IMNSPLPMBVFCYRSHOUVTZIPCFTAVCNFSM6AAAAABJVITZ5WVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM3DKOBSGA4TSNA . You are receiving this because you are subscribed to this thread.Message ID: @.***>