Wrote a test dropdown. Clicking on "All Categories" normally opens the list. But if Google Chrome is scaled down to 67% , then you may notice a list bouncing while opening.
What is the reason and how can I fix it? Maybe I'm not counting on something in the script.
categories = { openDropdownList: function(obj, id) { var padding = $('#'+id).find('.title').css('padding-top').match(/\d+/); $('#'+id).toggle().css({ left: $(obj).position().left - padding, top: $(obj).position().top - padding, }); $('#'+id).find('.title').html($(obj).text()); } } *, body {margin: 0; padding: 0;} body {overflow-x: hidden; background: #ededed; color: #333333; font-size: 18px; font-family: tahoma, verdana, arial, sans-serif, Lucida Sans; font-weight: normal; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; zoom: 1;} a {text-decoration: none; border: 0px; outline: none; cursor: pointer; color: #1e7ec8;} a:hover {text-decoration: underline;} a.dotted {text-decoration: none; border-bottom: 1px dotted #4d76a3; padding-bottom: 2px;} a.dotted:hover {text-decoration: none; border-bottom: 1px solid #4d76a3;} .none {display: none} #categories_dropdown_list {position: absolute; width: 200px; background: #ffffff;} #categories_dropdown_list .list a {display: block; padding: 8px;} <body> <div style="padding: 50px"></div> Категория: <a href="javascript://" onclick="categories.openDropdownList(this, 'categories_dropdown_list'); return false">Все категории</a> <div id="categories_dropdown_list" class="none br2px"> <div class="list"> <a href="#" class="title" onclick="categories.openDropdownList(this, 'categories_dropdown_list'); return false"></a> <a href="#">Категория 1</a> <a href="#">Категория 2</a> </div> </div> </body>