Devone

What's the Most Effective Way to Override Classes Using jQuery?

Asked by Devone 2 years ago jquery


Bruno Correia
1
 
// an example of how to overwrite the margin-bottom on a p tag

$('p').css({ 'margin-bottom' : '20px' });

// an example of how to change the class of an element

$('p.myClass').addClass('anotherClass');

// or you can also removeClass

$('p').removeClass('myClass');

by Bruno Correia 2 years ago

Answer this question

What's the Most Effective Way to Override Classes Using jQuery?

0 errors found:

 
0