var a = window.location.toString(); $(function(){ if(a = 'https://www.ssylk.com/'){ $('.downbar').css('display', 'block') } else{ $('.downbar').css('display', 'none') } }); 

There is a code that should check the link. If the link and the current position match, then the block is shown, otherwise it is not. This code does not work, help me figure out what the problem is, thanks

    1 answer 1

    Instead, the = operator was needed == . He solved his problem himself.

    • Generally, you need === , but okay) - Suvitruf