Rich-text Reply

Trying to make a whole div a link

elburnso 05-26-16

Trying to make a whole div a link

Hi

 

I'm hoping you can help me. I'm trying to make the whole product space around a product a hyperlink. Currently its only the product image and product title that is hyperlinked. By hyperlinking the wole area i'm hoping to increase the conversion rate on mobile.

 

See link below to the category where I'm trying to implement this. I have tried amending the code Derry GAA Carron Half Zip Training Top but its putting an underline under the price and reward points text. Is there an easy way to hyperlink a whole div?

 

https://www.oneills.com/shop-by-team/gaa-county/derry-gaa.html?optimizely_x6045491565=1

 

Many Thanks

Declan

 

Website Manager
Level 4

tedroddy 05-27-16
 

Re: Trying to make a whole div a link

Hi Declan,

This will require some custom code from a developer on your end to accomplish. Your developer could use jQuery's .each() method to modify each product view shown on the page. Each one would need to be wrapped in an anchor <a src="#"> element where # is the link to the product. Do you have a developer who is familiar with jQuery who could help you set that up?
Best,
Ted
Optimizely
MartijnSch 05-28-16
 

Re: Trying to make a whole div a link

It's indeed what Ted is suggesting, as long as you're able to do this with custom code via the JS editor you should be fine and able to run the test. I think the issue you're running into as well is the underlined pieces, this is also easily fixable by applying some style design changes.
elburnso 05-30-16
 

Re: Trying to make a whole div a link

Hi Ted

Thanks for getting back to me. No I don't have a developer, I have a very basic knowledge of code and have been trying to do this myself but have been running into difficulty.

Thanks
Declan
Website Manager
Level 4