javascript - Bootstrap accordian style table - show/hide all -


i have table set accordion when row clicked displays div underneath row. clicked again hides it.

i create button allows user expand or hide all.

var showing = true; $('#expandlist').click(function () {     if(showing) {         $(".collapse").collapse("hide");         showing = false;     } else {         $(".collapse").collapse("show");         showing = true;     } }); 

the hide portion works, show not. how detect if collapsed keep showing variable updated.


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -