Question

Devone

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

Asked by Devone 6 months ago jquery

Answers

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 6 months ago

Answer this question

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

0 errors found:

 
0