Posted May 20, 20241 yr 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, 20241 yr by lovex3you typo
May 20, 20241 yr 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. Recent article: Find out Why your Squarespace images might be bigger than you think You might want to check out my Squarespace Template Finder or read my Squarespace tips Speaking of tips, 💲I've got a tip jar. Feel free 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
Create an account or sign in to comment