Disabled dropdown menu items using twitter bootstrap

前端 未结 8 1086
挽巷
挽巷 2021-02-03 20:16

I use markup to display a dropdown menu using Twitter Bootstrap.

8条回答
  •  抹茶落季
    2021-02-03 20:40

    Similar to above you can use:

        li.disabled > a {
        color:#aaa !important;
        }
    

    This way you are keeping the same bootstrap default class for disabled links and implement the preventDefault() Javascript to disabled the link.

    $(".disabled").click(function(event) {
    event.preventDefault();
    return false;
    });
    

提交回复
热议问题