1
How to know if the toggle_sidebar
is or is not activated ?
I use this command to enable and disable:
uib_sb.toggle_sidebar($(".uib_w_43"));
1
How to know if the toggle_sidebar
is or is not activated ?
I use this command to enable and disable:
uib_sb.toggle_sidebar($(".uib_w_43"));
2
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...
}
I don’t really know how this toggle thing works, which I do know the same thing that turns it off. in case what would be the class, you know me inform ?
I found out it’s uib_bar_visible
, in the case as it would look ?
@Renanrodrigues I edited
o . foo is the div ?
I edited again. It is the element that you want to check if you have the class, I believe it is the .uib_w_43
.
OK, I’ll check here and if it goes well I accept the answer.
Browser other questions tagged javascript
You are not signed in. Login or sign up in order to post.
What is this method
toggle_sidebar()?
any plugin? which?– Sergio
Not toggle_sidebar() is something native to indexedb, serves to open a sidebar and close it.
– Renan Rodrigues
Native of
indexedb
? theindexedb
is a local browser database...– Sergio
Ops pardon of Intelxdk kkkk
– Renan Rodrigues