Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onload() {$('div') .attr('rich format2 type-a', ' standard format1 type-a') ; } window.onload =onload; }
- window.onload = onload;
- function onload(){
- var els = [].slice.apply(document.getElementsByClassName("rich format2 type-a"));
- for (var i = 0; i < els.length; i++) {
- els[i].className = els[i].className.replace(/ *brich format2 type-ab/g, "standard format1 type-a");
- } window.onload = onload;
- <div class="abc"></div>
- $('.abc').removeClass('abc').addClass('newClass');
- <div class="a b c"></div>
- $('.a.b.c').removeClass('a').removeClass('b').removeClass('c').addClass('newClass');
- $("div").attr("class", "def");
- $("div.abc").attr("class", "def");
- $("div.a.b.c").attr("class", "def");
- $('div').removeClass('a b c').addClass('d e f');
- jQuery(function($){
- $("div")
- .toggleClass('a b c');
- .toggleClass('d e f');
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement