Change CSS class properties with jQuery

后端 未结 8 1629
心在旅途
心在旅途 2020-11-29 04:59

Is there a way to change the properties of a CSS class, not the element properties, using jQuery?

This is a practical example:

I have a div with class

8条回答
  •  旧时难觅i
    2020-11-29 05:34

    You can remove classes and add classes dynamically

    $(document).ready(function(){
        $('#div').removeClass('left').addClass('right');
    });
    

提交回复
热议问题