javascript - I need help getting my slide to top accordion to stop below my fixed top header -
I think this is a Offset value for each item in accordion Is set, in which the line of css problem, but this
js . When my accordion link is clicked, they should open and slide to the top of the page - whatever they do, however, I have a fixed heading header and they are sliding behind it, I have about 60 px lower on the page This is necessary to stop the level so that it is visible.
jquery.accordion.js is 102. You can subtract just one static number in that value for each number (you have suggested 60px) so that how far in the document can be scrolled. To do this beautifully, I will pass it as another option which you can get from within the script by doing something like this (assuming that your option is
scrollOffset :
_saveDimValues: function () {scrollOffset = this.options.scrollOffset; it. $ Items.each (function () {var $ item = $ (this); $ item.data ({ OriginalHight: $ item.find ('a: first'). Height (), offsetTop: $ item.offset (top) - top of scrolloff}}}}}
Comments
Post a Comment