Hello, such a question, in the console in the browser, $ ('. Dropdown'). Offset () works correctly and returns {top: 350, left: 828}. The question is, how can you take only the height and put it in a variable? thank

    1 answer 1

    what offset () returns is just an object. So just take the property of the object.

    var this_top = $('.dropdown').offset().top 

    do not forget to get position in ready - so that the DOM is formed