Here you can find the source of removeStyleClass(className)
Element.prototype.removeStyleClass = function(className) { if (this.className === className) { this.className = ""; return;/* w w w . j a va 2 s. co m*/ } var regex = new RegExp("(^|\\s+)" + className.escapeForRegExp() + "($|\\s+)"); if (regex.test(this.className)) this.className = this.className.replace(regex, " "); };
Element.prototype.removeClass = function(className) { const regex = new RegExp(className, 'g') const newClasses = this.className.replace(regex, '') this.className = newClasses.trim() return this
Element.prototype.removeClass=function(className){ var classNames=this.className.split(' '), newClass=''; for(var i=0;i<classNames.length;i++){ if(classNames[i]!==className){ newClass+=' '+classNames[i]; return !!(this.className=newClass.trim()); ...
Element.prototype.removeClass = function(className){ this.className = this.className.replace(new RegExp('(^|\\s)' + className + '(?:\\s|$)'), '$1'); return this;
Element.prototype.removeClass = function(cls) { if (this.hasClass(cls)) { var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)'); this.className=this.className.replace(reg,' '); };