Why does my custom tabs section scroll up unexpectedly on Dawn?

anhad
Tourist
8 0 0

I made a custom tabs section to show product and shipping details but whenever i click on any of the tabs it scroll the screen to the top which ideally should not happen. Please help.

https://lanoagritech.farm/products/growkit-pro

anhad_1-1709363299966.png

 

Replies 6 (6)

Developer-G
Shopify Partner
3079 604 857

Check the source code and find why the tabs html is just after the opening <body> tag.

It should be in its actual position if you need it to work without an unexpected scroll. 

- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on store Hire me.
- Email: guleriathakur43@gmail.com - Skype: navrocks1 ,
- Try GEMPAGES a great page builder
-Advance Search Filter
anhad
Tourist
8 0 0

Can you elaborate please? I am new to coding.

Developer-G
Shopify Partner
3079 604 857

You mean you don't know what is source code? Check the screenshot 
ater-head.png

To understand better ask from the one who provided you this custom code or the one who implemented this section for you.  

- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on store Hire me.
- Email: guleriathakur43@gmail.com - Skype: navrocks1 ,
- Try GEMPAGES a great page builder
-Advance Search Filter
anhad
Tourist
8 0 0

This section has been coded in a separate section file and has been made to sit below the product in theme customization. The screenshot you shared is solely the code of this tabs section and that's why the tabs html is just after the <body> tag

Developer-G
Shopify Partner
3079 604 857

okay but to make it work accurately change the position of the code/section so it can work as you need. 
Or find why in source code the code is in the top. 

- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on store Hire me.
- Email: guleriathakur43@gmail.com - Skype: navrocks1 ,
- Try GEMPAGES a great page builder
-Advance Search Filter
anhad
Tourist
8 0 0

I tried putting defer in the following scripts and that makes the scroll work fine but it also makes all the tabs stack vertically instead of showing one at a time.

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" defer></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" defer></script>