All things Shopify and commerce
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
I am using the Prestige theme and I want to add a video hero section (autoplay muted with no button controls) with a Shop Now button in the middle. However, I noticed that the default Prestige video section doesn't come with a Button block, just Subheading, Heading and Paragraph. I inserted a link for the text through the text editor and added some custom css to make it look like a button. However, there is still one problem. The Title attribute in the <a> anchor tag is showing as a tooltip when I hover over the link which as you can imagine doesn't look good considering I am trying to make it look like a button.
I don't have experience in Shopify's liquid code, so I was wondering if there is a way to edit the code to remove the Title attribute from this link only? I don't want to remove the Title attribute from other element on the website, just this specific anchor tag. If there is an easier way to add a button without doing all this, I am open to suggestions. Thanks.
Solved! Go to the solution
This is an accepted solution.
Yes, you can remove the title using the javascript
var linkElement = document.querySelector('a[title="best-dog-ever-dog-bandana-collar"]');
if (linkElement) {
linkElement.removeAttribute('title');
}
Could you please share your store so i can check
I am still in the trial period for Prestige theme, so I still can't access the code. I am just looking for ideas to solve this issue before purchasing the theme. Below are some screenshots of the situation now. Hope this helps.
This is an accepted solution.
Yes, you can remove the title using the javascript
var linkElement = document.querySelector('a[title="best-dog-ever-dog-bandana-collar"]');
if (linkElement) {
linkElement.removeAttribute('title');
}
You are welcome