Change CSS properties on click

后端 未结 8 2340
情话喂你
情话喂你 2020-11-29 22:53

I am trying to change the CSS of one element on click of another element. I\'ve searched a lot but nothing works perfectly. Currently I am using the below code, but it doesn

8条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-29 23:36

    Try this:

    $('#foo').css({backgroundColor:'red', color:'white',fontSize:'44px'});
    

提交回复
热议问题