Also, this js technique is not strictly necessary on a compliant device. Simply linking the ePub3 css file AFTER the ePub2 css file would work the same way. RbnJrg’s js technique protects against non-compliant devices/apps by only linking the ePub3 css if it can run js. Thus you wouldn’t have decrepit devices ignoring all the css if it didn’t like one. A compliant device would do this automatically by ignoring css it doesn’t support. This js technique can be used in multiple ways, however, and is a great step in learning “fall-back” coding theories.
Thanks RbnJrg
|