Create a URL link to a background image

Hi there

Loving BB…

Quick question…is it possible to apply a link to a background image when using columns? Essentially I have three columns all of which have been allocated an image. Over the top of these images I have a text module. I would like the image and the text to be a link. http://surreyestates.com

Thanks

James

Hey James,

You can try the jQuery code below and see if it works for you. You’ll need to add an extra class name to the columns you want this to apply to, e.g., col-link.

jQuery(document).ready(function() {
  jQuery('.col-link').each(function() {
    var callout_link = jQuery(this).find('a').first().attr('href');
    jQuery(this).wrapInner('<a></a>');
    jQuery(this).find('a').first().attr('href',callout_link);
  }); 
});

Let us know how it goes! :slight_smile:

Ben