Use! Important in CSS applied with Jquery

Asked

Viewed 68 times

3

I have a code in Jquery, and would like to apply the !important in the CSS, as below:

$('.prodMenor:eq(6)').css('margin-right','0!important');

But the way I did it’s not working, there’s another way?

inserir a descrição da imagem aqui

I found an alternative solution:

CSS:

.imp{margin-right: 0!important}

Jquery:

    $('.prodMenor:eq(6)').addClass('imp');

Resolved! :)

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.