How to scroll to a certain tab on the same page on click of a button?
-
Hello
I made a button on the product page. I hope that clicking the button will scroll the page to the coupon tab. This tab is included in the “product tab” component. What should I do?
I tried copying the “href” of the coupon tab into the button link, but if other tabs are opened, such as “description”, they will not scroll over. Only when the “coupon“” tab is open, clicking the button will scroll to it. What is the correct approach?
Thank you!
Attachments:
You must be
logged in to view attached files.
Hi zhufan122881,
Thanks for reaching to us.
To assist you in the best possible manner, I kindly ask that you please provide me temporary wp-admin info (wp-admin URL, username, password) to the Private Content area, the old one doesn’t work, this will allow me to thoroughly investigate and address your concerns more efficiently.
Regards,
OK,See details below please
Hi zhufan122881,
Thanks for details.
You should use tab-title-wd_custom_tab
id instead. But please note that it helps you scroll down to Tabs section only without switching to specific tab, which requiring click action.
Regards,
Thank you, I tried it. After clicking, it will scroll to the “product tab” component, but the “coupon” tab cannot be opened automatically.
In fact, I think there should be a way to automatically open the “coupon” tab.
Because When I click on the “product rating” component, the “reviews” tab will scroll and open.
Can I implement this function?
Or, if the custom tab of coupon cannot be opened, can the default tab of “description” be automatically opened? I can put the coupon information in the description tab instead.
Thank you.
Attachments:
You must be
logged in to view attached files.
Hi zhufan122881,
Unfortunately, complicated customization is required to make it work, which is out of our basic support.
Thanks for understanding our limitations. Let me know if you have any questions.
Best Regards