css - Changing the background colour of an :after - JQuery -


i'm trying change colour of :after, using jquery although can't seem able change it, can point me in right direction please?

<script>     $( document ).ready(function() {         $( ".breadcrumb li:nth-child(1) a" ).css({'background-color' : '#f00'}); // works         $( ".breadcrumb li:nth-child(1):after " ).css({'background-color' : '#f00'}); // not work?     }); </script> 

i've tried using few selectors cannot find correct one. in advance.

try this,

css

.li-active-after a{background-color : #f00; } .li-active-after:after{background-color : #f00; } 

jquery

$( document ).ready(function() {     $(".breadcrumb li").removeclass('li-active-after');     $(".breadcrumb li:nth-child(1)").addclass('li-active-after'); }); 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -