Adding a link to Feature box icons

Hi all.

I’ve added this code

jQuery( document ).ready( function($){ $(".class-on-item-around-feature-box").each( function( ) { var link_value = jQuery(this).find(".x-btn").attr("href"); var link_element = '<a href="' + link_value + '"></a>'; jQuery(this).find('.x-feature-box').wrap(link_element); }); }):

… to my Global CSS as stated here: https://theme.co/apex/forum/t/how-to-link-an-icon-element/4585/11

But I still can’t get this to work.

The page is here: https://swift.property/contact/ and I’m looking to get each of the blue circle icons to link to respective links.

Could someone have a look for me? I’m happy to send a log in.

Thanks

Hi there,

Thanks for posting in.

It should be like this,

jQuery( document ).ready( function($){
$(".class-on-item-around-feature-box").each( function( ) {
var link_value = $($(this).find("a").get(0)).attr("href");
var link_element = '<a href="' + link_value + '"></a>';
$(this).find('.x-feature-box-graphic').wrap(link_element);
});
});

But it may not work since your site has existing errors from Moneypenny code and from analytics code you added in your global custom javascript.

Thanks!

Great. Thanks, I’ve now fixed it.

Glad to hear it!

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.