Jump to content

Additional info accordian to show on mobile

Recommended Posts

Site URL: http://ralop-srabwot.squarespace.com

Hi, I'm using code injection to move an accordian (in additional info) up to the buy button, the problem is it only shows on desktop not on mobile preview. Any ideas?

Code (sitewide code injection):

<!-- Move accordian up on product pages -->
<script>
(function(){
  var accordion = document.querySelector('.ProductItem-additional');
  var cartButton = document.querySelector('.sqs-add-to-cart-button-wrapper');                    
  
  if(accordion && cartButton) {
    // Remove accordion from current position.
    accordion.parentNode.removeChild(accordion);
    
    // Add accordion before the cart button.
    cartButton.before(accordion);
  }
})()
</script>

Muchas gracias 🙂

Link to comment
  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

Sorry for delay. Just had a long trip.

I see mobile has a different structure. Can you remove above code? We will give a new code

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.