How to hide visited links after a click to button?

前端 未结 2 936
醉酒成梦
醉酒成梦 2020-12-11 11:11

There are a list of links on a page and some of them are already visited by me. I have to make them invisible after any action(checking a checkbox, clicking button, etc).

2条回答
  •  余生分开走
    2020-12-11 11:41

    ok, so try this

    in your css file

    .foo a:visited{
        display:none;
    }
    

    in your javascript

    $('button').on('click', function(e){
        $('ul').addClass('foo');
    })
    

提交回复
热议问题