Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div mnt-watch-product="ZAL-BE-DP521I09O-K11">
- <button type="button" onclick="Monotote.show('ZAL-BE-DP521I09O-K11')">View details</button>
- <span>The product is not available</span>
- </div>
- <script>
- // define `_mnt` with a `publisherKey`
- _mnt.onReady = function(){
- Monotote.on("watch-product-availability-state-change", function(info){
- // it contains `element` and `available` properties
- info.element.className = info.available ? '' : 'disable-product';
- });
- }
- </script>
- <style>
- div span {
- display: none;
- }
- div.disable-product button {
- display: none;
- }
- div.disable-product span {
- display: initial;
- }
- </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement