mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-13 13:17:50 +08:00
remove length test add_class and remove_class
This commit is contained in:
parent
ec68f38ed7
commit
0740980d5c
@ -261,17 +261,11 @@ function(widget_manager, underscore, backbone){
|
||||
},
|
||||
|
||||
add_class: function (selector, class_list) {
|
||||
var elements = this._get_selector_element(selector);
|
||||
if (elements.length > 0) {
|
||||
elements.addClass(class_list);
|
||||
}
|
||||
this._get_selector_element(selector).addClass(class_list);
|
||||
},
|
||||
|
||||
remove_class: function (selector, class_list) {
|
||||
var elements = this._get_selector_element(selector);
|
||||
if (elements.length > 0) {
|
||||
elements.removeClass(class_list);
|
||||
}
|
||||
this._get_selector_element(selector).removeClass(class_list);
|
||||
},
|
||||
|
||||
update: function () {
|
||||
|
Loading…
Reference in New Issue
Block a user