zjquery: Allow removeClass() to remove multiple classes simultaneously.

removeClass() now splits class_names by spaces to get multiple
class names. Then removes each individual class name.
This commit is contained in:
Joshua Pan 2018-04-17 23:53:14 -07:00 committed by showell
parent e539e966c9
commit 09469026c6
1 changed files with 5 additions and 2 deletions

View File

@ -262,8 +262,11 @@ exports.make_new_elem = function (selector, opts) {
attrs.del(name);
return self;
},
removeClass: function (class_name) {
removeClass: function (class_names) {
class_names = class_names.split(' ');
class_names.forEach(function (class_name) {
classes.del(class_name);
});
return self;
},
remove: function () {