Make Featurebox clickable

I want to remove the href link that appears below the text of the faeture box, and simply make the whole feature box (icon + text) to be the clickable link.

Here’s what I’ve tried:

jQuery ( function( $ ) {

$('.x-feature-box-text a:last-child').each( function() {

$( this ).parent().parent().parent().find('.x-feature-box-graphic-inner img').wrap( '<a href="' + $( this ).attr('href') + '"></a>' );
$( this ).remove();

} );

 } );

Where I set a class ftboxind

function($) {
	$('.ftboxind').each(function(){
		var url = $(this).find('.x-feature-box-text > a').attr('href');
		$(this).find('.x-feature-box-graphic-inner img').wrapAll('<a href="' + url + '" />');
		$(this).find('h4').wrapAll('<a href="' + url + '" />');
	});
})(jQuery);

For reference

Hi @mrdchochief

I’ve added this JS snippet to (Theme Options > JS) and I can see it’s working fine:

jQuery ( function( $ ) {

  $('.ftboxind .x-feature-box-text a:last-child').each( function() {
    $( this ).parent().parent().parent().find('.x-feature-box-graphic-inner i').wrap( '<a href="' + $( this ).attr('href') + '"></a>' );
    $( this ).remove();
  } );

} );

Could you please clear your browser cache and recheck this issue?

Thanks.

Thanks, it works now!

I’ve been wrangling with this for a while now, so thank you!

On behalf of my colleague, you’re welcome. Cheers! :slight_smile:

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