How to dynamically add a style for text-align using jQuery

前端 未结 11 885
暗喜
暗喜 2020-12-08 04:19

I\'m trying to correct the usual IE bugs around CSS 2.1 and need a way to alter an elements style properties to add a custom text-align style.

Currently in jQuery yo

11条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-08 04:29

    I usually use

    $(this).css({
        "textAlign":"center",
        "secondCSSProperty":"value" 
    });
    

    Hope that helps

提交回复
热议问题