current class removed when refreshing page

前端 未结 4 1586
太阳男子
太阳男子 2021-01-27 17:08

I have created a dynamic link list in one page...

When a click is done on one link on that dynamic list i want to show to user that link is active, so i will add one cla

4条回答
  •  自闭症患者
    2021-01-27 17:30

    Changing the class via AJAX only stores the information locally. So, whenever you refresh the page, this data is lost.

    To get around this, you could get your page to remember this by setting a cookie.

提交回复
热议问题