Changing class in element grid

Moderator: Support

AntonioGraca
Posts: 1
Joined: Thu Aug 20, 2020 11:48 pm

Changing class in element grid

Post by AntonioGraca »

Hi

Im trying change a class of an element Grid, runing inside a function the following code.

document.getElementById('Micro_tr').changeClass="corrigir_fixar_header";

in CSS

.corrigir_fixar_header {
margin:auto;
margin-top: 120px;
}

But, nothing change. What I need to do to work?

Ionic 3

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

Re: Changing class in element grid

Post by Serhii Kulibaba »

Hello Antonio,

Please use the attribute ngClass to make the class dynamic for Ionic 3 projects: https://stackoverflow.com/questions/501 ... ss-ngclass

Post Reply