D
D
Daniil Sukhikh2018-03-19 11:54:00
css
Daniil Sukhikh, 2018-03-19 11:54:00

How to hide 1 block when opening another?

I tried to write a code in JQuery that if one block has the display property equal to block, then the stroke of the other one disappears.

var $menutf = $('.navtf').css('display');
    if ($menutf == 'block') {
      $('header').css({
        "border": "0"
      });
    }

But doesn't work...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis, 2018-03-19
@danchiksux

var menutf = $('.navtf');
if (menutf.is(':visible')) {
    $('header').css({
        "border": "0"
      });
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question