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 or marking it as a solution.
For B2B solutions and custom pricing, check out B2B Solution & Custom Pricing |
For adding product labels/badges, visit Product Labels by BSS
BSS Commerce - Shopify Apps & Store Development Service Provider
Hire a Shopify expert | Shopify Plus Store Development
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 or marking it as a solution.
For B2B solutions and custom pricing, check out B2B Solution & Custom Pricing |
For adding product labels/badges, visit Product Labels by BSS
BSS Commerce - Shopify Apps & Store Development Service Provider
Hire a Shopify expert | Shopify Plus Store Development
User | RANK |
---|---|
186 | |
168 | |
78 | |
56 | |
45 |
Transform this holiday season into a shopping spree. Plus, learn how to effortlessly open ...
By Jasonh Dec 8, 2023Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023