Testimonials

Don't take our word for it. Hear what our customers say

 

<div class=”scratch-off-game”> <div class=”card”> <div class=”scratch-off-area”></div> <div class=”hidden-discount”> <!– Display the discount amount and coupon code –> <p class=”discount-amount”></p> <p class=”coupon-code”></p> </div> </div> <button class=”scratch-off-button”>Scratch Off</button> </div> <script> jQuery(document).ready(function($) { var discounts = [10, 20, 30, 40, 50]; // The possible discount amounts // Function to generate a random coupon code function generateCouponCode() { var characters = ‘0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ’; var code = ”; for (var i = 0; i < 10; i++) { code += characters.charAt(Math.floor(Math.random() * characters.length)); } return code; } // Event handler for the scratch-off button $(‘.scratch-off-button’).click(function() { // Generate a random discount amount and coupon code var discount = discounts[Math.floor(Math.random() * discounts.length)]; var couponCode = generateCouponCode(); // Display the discount amount and coupon code $(‘.hidden-discount .discount-amount’).text(‘You won a ‘ + discount + ‘% discount!’); $(‘.hidden-discount .coupon-code’).text(‘Coupon code: ‘ + couponCode); // Show the hidden discount $(‘.hidden-discount’).show(); // Disable the scratch-off button $(this).prop(‘disabled’, true); }); }); </script>