Is there any way to refresh div when clicked on bootstrap tab in Jquery?

Hello there I have problem as below.

    <div class="btn-choice">
        <button type="button" class="btn" id="active-all">All</button>
        <button type="button" class="btn active" id="btn-a">A</button>
        <button type="button" class="btn" id="btn-a">B</button>
        <button type="button" class="btn" id="btn-a">C</button>
        <button type="button" class="btn btn-default" id="btn-a">D</button>
    </div>


$("#active-all").click(function(){
    $('.btn').toggleClass('active');
});

I have added active class to button whenever I active-all button. I found this active class apply to every tab that I have those html button. So that I want refresh that div every time I clicked tab.

I try with jquery load() and reload() but this seems not solving my problem.

57 thoughts on “Is there any way to refresh div when clicked on bootstrap tab in Jquery?”

Leave a Comment