Add another class to a div

前端 未结 7 906
盖世英雄少女心
盖世英雄少女心 2020-11-29 07:29

I have a function that checks the age of a form submission and then returns new content in a div depending on their age. Right now I am just using getElementById to replace

7条回答
  •  有刺的猬
    2020-11-29 07:47

    I use below function to animate UiKit gear icon using Just JavaScript

    document.getElementById("spin_it").onmouseover=function(e){
    var el = document.getElementById("spin_it");
    var Classes = el.className;
    var NewClass = Classes+" uk-icon-spin";
    el.className = NewClass;
    console.log(e);
    }

    This code not work here...you must add UIKit Style to it

提交回复
热议问题