Shopify themes, liquid, logos, and UX
Hi guys! Can anyone help me show this Description section? I want the description open automatically without clicking it so they'll read it immediately in phone devices. Is that possible?
My store: www.enchantedgifts.ph
My theme: Ella
Solved! Go to the solution
This is an accepted solution.
Hi @Kaymi ,
Step 1: Go to the Shopify Admin, select Themes section and select Edit code
Step 2: Find the theme.liquid file
Add the following code before the </body> code:
if (window.location.href.includes("/products/") && window.innerWidth < 550) { function appendDescriptionDiv() { const newDiv = document.createElement("div"); const descriptionContent = document.querySelector("#tab-description-mobile .tab-popup-content span").textContent; newDiv.textContent = descriptionContent; newDiv.style.marginBottom = "8px"; const descriptionTab = document.getElementById("tab-description"); descriptionTab.appendChild(newDiv); } setTimeout(appendDescriptionDiv, 1000); }
Result:
Hope it helps @Kaymi !
If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here ☕.
B2B Solution & Custom Pricing | Product Labels by BSS
Need help from our expert? Kindly share your request with us via community@bsscommerce.com
This is an accepted solution.
Hi @Kaymi ,
Step 1: Go to the Shopify Admin, select Themes section and select Edit code
Step 2: Find the theme.liquid file
Add the following code before the </body> code:
if (window.location.href.includes("/products/") && window.innerWidth < 550) { function appendDescriptionDiv() { const newDiv = document.createElement("div"); const descriptionContent = document.querySelector("#tab-description-mobile .tab-popup-content span").textContent; newDiv.textContent = descriptionContent; newDiv.style.marginBottom = "8px"; const descriptionTab = document.getElementById("tab-description"); descriptionTab.appendChild(newDiv); } setTimeout(appendDescriptionDiv, 1000); }
Result:
Hope it helps @Kaymi !
If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here ☕.
B2B Solution & Custom Pricing | Product Labels by BSS
Need help from our expert? Kindly share your request with us via community@bsscommerce.com
We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024