|
December 29, 1999 Moving Up DHTML Elements Tips: December 1999
Yehuda Shiran, Ph.D.
|
|
One of the ways to implement a cross-browser vertical movement is to use the top property in Netscape Navigator and the pixelTop property in Internet Explorer. The DOCJSLIB's function docjslib_moveVertically() accepts as parameters the DHTML element id and a pixel increment by which to move it vertically:
Let's see a typical example. The
Notice that there is not a single check for the browser identification. All browser-dependent stuff is handled by DOCJSLIB. To learn more about DOCJSLIB library and its usage in implementing a scroller, read Column33, DOCJSLIB Version 4.0: Scrollers, Watermarks, and Games.
People who read this tip also read these tips: Look for similar tips by subject: |