lovex3you Posted May 20 Share Posted May 20 (edited) I used a custom code block provided by this community to move "additional product details" directly below the product description. However, on mobile it's making my regular product detail show below the 'add to cart' button and everything else is showing above. How can i fix this? Edited May 20 by lovex3you typo Link to comment
colin.irwin Posted May 20 Share Posted May 20 Try this <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $(document).ready(function() { function repositionElement() { if ($(window).width() > 768) { $('section.ProductItem-additional').insertAfter('.ProductItem-details-excerpt'); } } repositionElement(); $(window).resize(repositionElement); }); </script> <style> @media (min-width: 769px) { section.ProductItem-summary { align-items: flex-start !important; } section.ProductItem-additional { margin-top: 20px !important; margin-bottom: 20px !important; } } </style> It checks the width of the viewport and only repositions the item if width > 768px. I'm Colin Irwin aka silvabokis. I've been a Squarespace designer & developer since 2013. I remember when it was all wild prairies round these here parts. 🐃🤠 Advice I give on here is free, though I may sometimes post an affiliate link or promote something I've written. That reminds me.. ..you might want to check out my Squarespace template finder or have a look at my other Squarespace tips Speaking of tips, 💲I've got a tip jar that you're welcome to throw a few quid into if you think I've helped you. If you're looking for a Squarespace developer Book a chat or Drop me a line - first meeting is always free Link to comment
lovex3you Posted May 21 Author Share Posted May 21 It did not work 😞 -- still the same issue Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment