Disable button with jquery?

Hi,

I have two buttons

<button id=“one”></button>
<button id=“two”></button>

Can I do something like:

if ($(‘#one’).hasClass(‘active’).disable(‘#two’))

??

The thing is I have two push-menus, and I don’t want to be able to open the second one before the first one is closed.

You could do:

if ($('#one').hasClass('active')){
  $("#two").prop('disabled', true);
}

Thanks! works fine! Pullo the savior.