cookies - Remember active class on reload -
i creating single page website - menu items change class "active" when user on current section of page - works out fine, browser "forgets" menu-item current 1 on reload.
is there way make browser remember element the last 1 have class "active", before reload?
use localstorage.
when mark item "active", save it's id or number in localstorage. after loading of page, retrieve information , mark corresponding item.
Comments
Post a Comment