Jump to content

Mobile dropdown not displaying correct info

Recommended Posts

Hi,

I am having an issue with an expansion block on mobile. 

I am trying to understand how I can hide the opening hours by default unless someone clicks on the "+" sign to reveal further info. 

This site was inherited so I am not sure exactly how it was set up originally. 

By default, all opening hours show aside from Monday-Wednesday which is revealed when someone clicks on the "+". 

Where would I go to get this corrected?

site: https://www.valleydental.au/

 

Thanks

IMG_2808.jpg

IMG_2809.jpg

Link to comment
  • Replies 4
  • Views 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

How have you got this set up? It looks like you have multiple blocks for one accordion, is that correct? Have you used the accordion block? How are you hiding/showing on desktop/mobile? 

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
On 10/20/2023 at 5:37 PM, Ziggy said:

How have you got this set up? It looks like you have multiple blocks for one accordion, is that correct? Have you used the accordion block? How are you hiding/showing on desktop/mobile? 

Hi Ziggy, 

Thanks for the reply. I have actually inherited the site so it wasn't me who originally set it up. After speaking with the support I have been told it's via CSS. 

I found the following code under Website > Website Tools > Code Inject. I am fairly certain this is relevant code as it's posted in the footer section. I am however not sure where I can edit which info is shown when the accordion is expanded vs closed.
 

<script type="text/javascript">
    if(jQuery( window ).width() < 768){
        $('.fe-block-aeaa291a50cfb746b08c').find('p.sqsrte-small:nth-child(2)').hide();
        $('.fe-block-aeaa291a50cfb746b08c .sqs-block-content strong').click(function(){
            $('.fe-block-aeaa291a50cfb746b08c').find('p.sqsrte-small:nth-child(2)').toggle();
        })

        $('.fe-block-1a523a3d869699d390b0').find('p.sqsrte-small:nth-child(2)').hide();
        $('.fe-block-1a523a3d869699d390b0 .sqs-block-content strong').click(function(){
            $('.fe-block-1a523a3d869699d390b0').find('p.sqsrte-small:nth-child(2)').toggle();

        })

        $('.fe-block-yui_3_17_2_1_1663633048027_41565').find('p.sqsrte-small:nth-child(2)').hide();
        $('.fe-block-yui_3_17_2_1_1663633048027_41565 .sqs-block-content p.sqsrte-small:nth-child(1)').click(function(){
            $('.fe-block-yui_3_17_2_1_1663633048027_41565').find('p.sqsrte-small:nth-child(2)').toggle();

        }) 

        $(".fe-block-yui_3_17_2_1_1663633048027_41565").click(function(){
            $(".fe-block-yui_3_17_2_1_1663633048027_41565").toggleClass('open');
        });
        $(".fe-block-aeaa291a50cfb746b08c").click(function(){
            $(".fe-block-aeaa291a50cfb746b08c").toggleClass('open');
        });
        $(".fe-block-1a523a3d869699d390b0").click(function(){
            $(".fe-block-1a523a3d869699d390b0").toggleClass('open');
        });
    }
</script>


Thank you
 

Link to comment
2 minutes ago, SMConsult said:

Hi Ziggy, 

Thanks for the reply. I have actually inherited the site so it wasn't me who originally set it up. After speaking with the support I have been told it's via CSS. 

I found the following code under Website > Website Tools > Code Inject. I am fairly certain this is relevant code as it's posted in the footer section. I am however not sure where I can edit which info is shown when the accordion is expanded vs closed.
 

<script type="text/javascript">
    if(jQuery( window ).width() < 768){
        $('.fe-block-aeaa291a50cfb746b08c').find('p.sqsrte-small:nth-child(2)').hide();
        $('.fe-block-aeaa291a50cfb746b08c .sqs-block-content strong').click(function(){
            $('.fe-block-aeaa291a50cfb746b08c').find('p.sqsrte-small:nth-child(2)').toggle();
        })

        $('.fe-block-1a523a3d869699d390b0').find('p.sqsrte-small:nth-child(2)').hide();
        $('.fe-block-1a523a3d869699d390b0 .sqs-block-content strong').click(function(){
            $('.fe-block-1a523a3d869699d390b0').find('p.sqsrte-small:nth-child(2)').toggle();

        })

        $('.fe-block-yui_3_17_2_1_1663633048027_41565').find('p.sqsrte-small:nth-child(2)').hide();
        $('.fe-block-yui_3_17_2_1_1663633048027_41565 .sqs-block-content p.sqsrte-small:nth-child(1)').click(function(){
            $('.fe-block-yui_3_17_2_1_1663633048027_41565').find('p.sqsrte-small:nth-child(2)').toggle();

        }) 

        $(".fe-block-yui_3_17_2_1_1663633048027_41565").click(function(){
            $(".fe-block-yui_3_17_2_1_1663633048027_41565").toggleClass('open');
        });
        $(".fe-block-aeaa291a50cfb746b08c").click(function(){
            $(".fe-block-aeaa291a50cfb746b08c").toggleClass('open');
        });
        $(".fe-block-1a523a3d869699d390b0").click(function(){
            $(".fe-block-1a523a3d869699d390b0").toggleClass('open');
        });
    }
</script>


Thank you
 

That code hides the sections, probably during editing too, so copy that code onto a text file for backup, delete it from the website, then edit the text you want, then put the code back in.

You could comment out the code if you know how as well, basically add <!-- at the very beginning and --> at the very end, but a text file might be easier.

If an answer I provide helps you, please mark it as the answer so others can easily access it as well.

I'm a Squarespace Authorized TrainerSquarespace Expert, and Circle Member and I've been helping my clients as well as those here in the forum and in various Squarespace groups with custom coding and support for Squarespace websites. I would love to help you in any way I can.

Squarespace PluginsBook Live Help | Squarespace Video Tutorials | Buy Me a Coffee

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.