Ctrl_Alt_Defeat Ctrl_Alt_Defeat - 2 months ago 20
jQuery Question

remove keyword from class name

I have the following markup - what i need to achieve is remove the 'active' word from the day class (on the line in bold in the markup)

<div class="datepicker-days" style="display: block;">
<table class="table-condensed">
<th colspan="7" class="datepicker-title" style="display: none;"></th>
<tr><th class="prev" style="visibility: visible;">«</th><th colspan="5" class="datepicker-switch">November 2016</th><th class="next" style="visibility: hidden;">»</th></tr>
<tr><th class="dow">Su</th><th class="dow">Mo</th><th class="dow">Tu</th><th class="dow">We</th><th class="dow">Th</th><th class="dow">Fr</th><th class="dow">Sa</th></tr>
<td class="day old">30</td>
<td class="day old">31</td>
**<td class="day active today">1</td>**
<td class="day disabled">2</td>
<td class="day disabled">3</td>
<tfoot><tr><th colspan="7" class="today" style="display: none;">Today</th></tr><tr><th colspan="7" class="clear" style="display: none;">Clear</th></tr></tfoot>

I tried the following jQuery but it doesnt seem to be working

$('.day').css('active', '');


Did you hear about .removeClass() method in jquery.

Remove a single class, multiple classes, or all classes from each element in the set of matched elements.