##// END OF EJS Templates
remove length test add_class and remove_class
Jonathan Frederic -
Show More
@@ -261,17 +261,11 function(widget_manager, underscore, backbone){
261 },
261 },
262
262
263 add_class: function (selector, class_list) {
263 add_class: function (selector, class_list) {
264 var elements = this._get_selector_element(selector);
264 this._get_selector_element(selector).addClass(class_list);
265 if (elements.length > 0) {
266 elements.addClass(class_list);
267 }
268 },
265 },
269
266
270 remove_class: function (selector, class_list) {
267 remove_class: function (selector, class_list) {
271 var elements = this._get_selector_element(selector);
268 this._get_selector_element(selector).removeClass(class_list);
272 if (elements.length > 0) {
273 elements.removeClass(class_list);
274 }
275 },
269 },
276
270
277 update: function () {
271 update: function () {
General Comments 0
You need to be logged in to leave comments. Login now