View Full Version : DHTML CMotion II upgrade

09-27-2009, 08:10 AM

2) AUTHOR NAME/NOTES: Dynamic Drive/jscheuer1

3) DESCRIPTION: A re-imagination of CMotion II (the vertical version of CMotion) as an Object Oriented multiuse script. In addition to the the OO (which is added in a fairly transparent manner - so as to be in the most part familiar to those already acquainted with Cmotion II), it now also automatically strips all non null value (comments and bare text nodes) from each gallery, implementing (via the Math min and max methods) precise beginning and ending termination points for the scrolling cross browser. In other words, these galleries will now stop on a dime at each end - as opposed to the old script's habit of stopping at slightly different points depending upon how fast it was moving and/or what browser was viewing it when it got to the end or the beginning of the gallery. If the images are all of the same height, or their placement and heights are well thought out, this allows the savvy user to setup their galleries to precisely display a given number of images (or whatever their preferred presentation is) at each end. Text may be included (if desired) within a div element. Other changes include a delegation of several repetitive calculations to the initialization phase so as to speed and lower the overhead of actual execution, minor changes to markup and styles to conform to both modern browsers and the standards as well as to support separation of content (HTML) from both presentation (style) and functionality (script). Since this is an OO script, a reference is provided and documented for advanced users who wish to access a given gallery's instance. Initialization by default is limited to once per page load per gallery, but this may be overridden if need be (like for AJAX), and if so will clean up (remove) that gallery's 'End of Gallery' (if so configured and already initialized) element before reinitializing. All configuration options (except the ability to add text - which is only incidental), features, and requirements are well documented in the source for and as appropriate to the HTML, the CSS and, script files.


demo page:




css style: