Toggle_sidebar event

Asked

Viewed 36 times

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"));
  • What is this method toggle_sidebar()? any plugin? which?

  • Not toggle_sidebar() is something native to indexedb, serves to open a sidebar and close it.

  • Native of indexedb? the indexedb is a local browser database...

  • Ops pardon of Intelxdk kkkk

1 answer

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.

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.