How do I know if toggle_sidebar
is enabled or not?
I use this command to enable and disable:
uib_sb.toggle_sidebar($(".uib_w_43"));
How do I know if toggle_sidebar
is enabled or not?
I use this command to enable and disable:
uib_sb.toggle_sidebar($(".uib_w_43"));
Use hasClass()
to know if the element has the class the class that makes it active, for example:
if($('.uib_w_43').hasClass('.uib_bar_visible')){
// Está ativo...
}
Or you can do without jQuery, using classlist#contains()
:
var foo = document.querySelector('.uib_w_43');
if(foo.classList.contains('uib_bar_visible'){
// Está ativo...
}