Update css using jQuery

前端 未结 2 1883
挽巷
挽巷 2021-01-24 19:55

I am trying to update the css of my navbar using jQuery.

Where you would normally define the css as:

.navbar-static-top .navbar-nav > .active > a{
         


        
2条回答
  •  猫巷女王i
    2021-01-24 20:12

    try out using find

    jQuery(".navbar-static-top .navbar-nav").find(".active").find("a").css("background-color","#000");
    

    Thanks !

提交回复
热议问题