// Due to this Code ): Syntax problem.
$('.myClass', '.myOtherClass').removeClass('theclass');
According to jQuery documentation: https://api.jquery.com/multiple-selector/
When can select multiple classes in this way:
jQuery(“selector1, selector2, selectorN”) // double Commas. // IS valid.
jQuery('selector1, selector2, selectorN') // single Commas. // Is valid.
by enclosing all the selectors in a single '...' ' or double commas, "..."
So in your case the correct way to call multiple classes is:
$('.myClass', '.myOtherClass').removeClass('theclass'); // your Code // Invalid.
$('.myClass , .myOtherClass').removeClass('theclass'); // Correct Code // Is valid.