javascript - How to scroll an overlay div on mobile -



javascript - How to scroll an overlay div on mobile -

i've got mobile website has navigation menu displayed on click of fixed position button in top right. menu fixed top of menu starts 10px below bottom of button. problem navigation menu can longer height of device beingness used, , when seek , scroll scroll content behind navigation menu seeing fixed. can help me around this?

as per comment:

you need utilize js find height of screen, top of menu , set max height of menu difference of these

for height of window utilize $('window').height()

for menu's distance top of browser: $('.menu').offset()

the function should live in show menu event listener:

var maxheight = $(window).height() - $('.menu').offset(); $('.menu').css({ "max-height" :maxheight})

make sure overflow:scroll; set on menu

javascript html css responsive-design

Comments

Popular posts from this blog

php - How to pass multiple values from url -

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

database - php search bar when I press submit with nothing in the search bar it shows all the data -