Borja
Borja

Reputation: 3551

How to edit a class with Jquery ? (delete and add property to an existing class)

I have a class in CSS:

.class {
    color: #fff;
    background: #000;
    border-bottom: 1px solid #ff0000;
}

With jQuery how can I edit that class and create a new class like the below?

.class {
    color: #777777;
    background: #fff;
}

Upvotes: 0

Views: 37

Answers (1)

B.K
B.K

Reputation: 11

Try this:

$('.class').css('border-bottom', 'none');

Upvotes: 1

Related Questions