Programming Tips - jQuery: Remove some class and add some class in one statement

Date: 2017apr21 Language: javaScript Library: jQuery Q. jQuery: Remove some class and add some class in one statement A. Here is a way:
$('#mything').removeClass('oldclass').addClass('newclass');
There is also toggleClass() which removes a class if its there and adds it if not there.