I need to change the position of the item when I click on the link. I found one working code, but the problem is that it works through the style attribute
var _menu = $(".a-about-me"); var _block = $(".about-me"); _menu.click(function () { if (_block[0].style.top === '700px') { _block.animate({ 'top': '405px' }, 600); } else { _block.animate({ 'top': '700px' }, 600); } }); I need to change the values of the properties directly in the stylesheet. I am new and do not know how to fix ... should be like this
var _menu = $(".a-about-me"); var _block = $(".about-me"); _menu.click(function () { if (_block[0].css('top') === '700px') { _block.animate({ 'top': '405px' }, 600); } else { _block.animate({ 'top': '700px' }, 600); } });
[0]in the second version, it will be almost equivalent to the first - Grundy