Monday, August 18, 2008

JavaScript Scrolling with Prototype or Script.aculo.us

Just discovered that both Prototype's Element.scrollTo('id'), or $('id').scrollTo(), and Script.aculo.us' Effect.ScrollTo('id') will fail if the desired element is not currently visible on the page.  I didn't try with visibility:hidden; but trying to programmatically scroll to an element with display:none; will result in nothing happening.  Just something to remember...