spacetripsounds Posted April 6, 2022 Posted April 6, 2022 Site URL: https://www.spacetripsounds.com/ I was wondering if it's possible to determine the "Add To Cart" button color within this code that I have used to add "Add To Cart" buttons to each of my products so people don't have to click each manually and add to cart within the products page? (see code below) Im trying to change the color of the add to cart buttons to orange (same color as the add to cart button on the home page) on this page: https://www.spacetripsounds.com/freedownloads <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <style> .products .grid-item { padding-bottom: 60px; width: 100% !important; } .products .grid-item .sqs-add-to-cart-button { position: absolute; z-index: 9999; bottom: 0; left: 0; right: 0; width: 200px; min-width: 200px; margin: auto; } </style> <script> $(".products .grid-item").each(function(e){ $(this).append('<div class="sqs-add-to-cart-button sqs-suppress-edit-mode sqs-editable-button" role="button" tabindex="0" data-product-type="1" data-original-label="Add To Cart"><div class="sqs-add-to-cart-button-inner">Add To Cart</div></div>'); }); $(function() { $(".products .grid-item").each(function(e){ var dataItemId = $(this).attr('data-item-id'); $(this).find('.sqs-add-to-cart-button').attr('data-item-id', dataItemId); }); }); </script>
tuanphan Posted April 10, 2022 Posted April 10, 2022 Add this to Freedownloads Page Header <style> div.sqs-add-to-cart-button div { background-color: #e95113; padding: 5px; } </style> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment