Changing background color dynamically with jquery

后端 未结 3 1092
旧时难觅i
旧时难觅i 2021-01-29 05:27

Right now there is a part of my page that has a list of objects. When you hover over them, the background turns a light yellow color and return to white when you mouseout. I wan

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-29 06:28

    Alright so the problem here seems to be you have a mouseover and a click which conflict with each other because obviously mouseover will fire first and then onclick will fire so unless you go out and come back in it won't trigger the mouseover again.

    Try this maybe

    $("div input").hover(function() {
    //Do you
    });
    

提交回复
热议问题