Jump to content

Custom secondary button not displaying on mobile (ok on desktop)

Go to solution Solved by tuanphan,

Recommended Posts

Site URL: https://www.kairastudios.com/

Hi we have a custom secondary button that displays fine on desktop but is not displaying on mobile menu, can someone take a look and see what is missing?  Fine to be stacking below Course Login on mobile, just needs to appear. 

https://www.kairastudios.com/

Button in question is "Pilates Classes"

Desktop:image.thumb.png.8ebe893e7e37283320802ecfa7c58d18.png

Mobile:

image.thumb.png.886af5cdae5aefa8e7aee5c74927d683.png

 

Edited by Kaira
clarification of screenshots
Link to comment
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • Solution

Hi,

Edit this code

<script>

  $( ( ) => {
 
    let $cta = $( '.header-actions-action--cta' );
   
    let $newButton = $( '.btn', $cta [ 0 ] ).clone ( );
   
    $newButton.attr ( 'href', 'https://live.kairastudios.com/login' );
    $newButton.text ( 'Pilates Classes' );
   
    $cta.append ( $newButton );
   
    } );
   
  </script>

to this (I added one more class name)

<script>

  $( ( ) => {
 
    let $cta = $( '.header-actions-action--cta, .header-menu-cta' );
   
    let $newButton = $( '.btn', $cta [ 0 ] ).clone ( );
   
    $newButton.attr ( 'href', 'https://live.kairastudios.com/login' );
    $newButton.text ( 'Pilates Classes' );
   
    $cta.append ( $newButton );
   
    } );
   
  </script>

 

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.