所以,我知道如何在点击时更改css。但是如何改变.button:after?
$(".button").click(function(){
$(".button").css('content', "\f176");
});
这不起作用。
答案 0 :(得分:1)
您可以添加style
标记并添加首选的伪元素
<style id="button"></style>
在这里:
$(".button").click(function(){
$("#button").text('button{content: "\f176"}');
});