remain added class after refresh

I found this fiddle from other questions, and its good to use. The problem is the added class(.active) in button remove when refresh. How can I make it remain even I reload it.



<div class="flr-wrap">
    <li><a class="button active" data-rel="#content-a" href="#">a button</a></li>
    <li><a class="button" data-rel="#content-b" href="#">b button</a></li>

<div class="flr-inner">
    <div class="container" id="content-a">
    <div class="container" id="content-b">


    // set content on click
$('.button').click(function(e) {

// set content on load
$('').length && setContent($(''));

function setContent($el) {


Thanks in advance..

4 thoughts on “remain added class after refresh”

  1. Wonderful blog! Do you have any suggestions for aspiring writers?
    I’m planning to start my own website soon but I’m a little lost on everything.

    Would you propose starting with a free platform like WordPress or go for
    a paid option? There are so many options out there that I’m totally confused ..
    Any ideas? Thanks a lot!

  2. Hi! This post could not be written any better! Reading this
    post reminds me of my old room mate! He always kept talking
    about this. I will forward this page to him. Pretty sure he will have a good read.
    Thanks for sharing!


Leave a Comment