dx/compare - Compare shortcode test
This page is used to validate the compare shortcode end-to-end:
- HTML output renders correctly
- the slider works (JS loads once via
scripts.gohtml) - CSS is applied
- common parameters don’t break the build
Tip: keep
before.jpgandafter.jpgin the same page bundle folder as thisindex.mdso the examples work with simple relative paths.
Side-by-side
Code
| |
Renders

Before

After
Slider (default 50%)
Code
| |
Renders
Slider (custom start position + credits)
Code
| |
Renders
Notes
- If the slider doesn’t move, check the browser devtools Network tab for
dx-compare.js. - If you see errors about
width, try removing it or using theNN:NNformat (for example60:40).