onclick="if (typeof zamanux = 'undefined') {document.getElementById('zam').style.right='-75px';}; 

I am inexperienced ... I cannot understand where I am ... tell me without if it works fine

    1 answer 1

    It seems everything is written correctly. And what's actually wrong?

    You can still try this:

     if (zamanux == undefined) ... 

    or

     if (zamanux == null) ... 
    • without if the block shifts to the right ... with if does not shift - Nuboyd
    • Thank you if (zamanux = 'undefined') ... like this - Nuboyd
    • oh, really ... a classic mistake! ) @AlexWindHope thanks for noticing - Alex Kapustin