Home / Buttons / NAVIGATION SET
COMPARE button
Visitors pick 2–3 products and see them side by side in a comparison table. Stored on the visitor's device, no sign-in.
Tag name: <nut-so-sanh> · Vietnamese name: SO SÁNH
REAL BUTTON — TAP IT
Open the demo on its own page →
Install in one minute
Upload nut-so-sanh.js to your site, then paste this where the button should appear:
<script defer src="/nut/nut-so-sanh.js"></script>
<nut-so-sanh ma="sp-101" ten="5-blade stand fan" gia="$19" thong-so='{"Power":"55W","Blades":"5","Warranty":"12 months"}' kieu="vien"></nut-so-sanh>
<nut-so-sanh ma="sp-102" ten="3-blade ceiling fan" gia="$45" thong-so='{"Power":"70W","Blades":"3","Remote":"Yes"}' kieu="vien"></nut-so-sanh>
<nut-so-sanh></nut-so-sanh>Button attributes
| Attribute | Default | Meaning |
|---|---|---|
ma | — | Product ID. With ma the button adds/removes the product. Without it the button opens the comparison table. |
ten | — | Product name. |
link | current page | Product page URL. |
anh | — | Image URL. |
gia | — | Display price. |
thong-so | — | Specs as JSON, e.g. {"Power":"55W"}. |
toi-da | 3 | Maximum number of products in the table. |
Shared attributes
| Attribute | Meaning |
|---|---|
mau | Button background, set it to your brand color |
mau-chu | Text and icon color |
nhan | Button text |
kieu | icon = 44px round icon only · vien = outline button |
rong | Full-width button |
ghi-luot | Path to the PHP file that logs clicks |
Version history
- 1.0.0 (2026-10-05) — First packaged release as a self-contained component.
- 1.1.0 (2026-10-05) — Added English: button text, messages and dialogs follow the page language (<html lang>).
Share this page: