Open Emperor01 opened 6 years ago
'use strict';
function removeClass(obj, className) {
return obj.split(' ').filter( function (item) {return item !== className}).join(' '); }
var obj = { text: 'open menu open open menu' };
obj.text = removeClass(obj.text, 'menu');
alert(obj.text);
'use strict';
function removeClass(obj, className) {
return obj.split(' ').filter( function (item) {return item !== className}).join(' '); }
var obj = { text: 'open menu open open menu' };
obj.text = removeClass(obj.text, 'menu');
alert(obj.text);