Make a Complete Module Clickable (make a div a link)?

Many thanks Ben for the extra work around - this worked a treat! :slight_smile:

Kat

Awesome! Enjoy BB! :slight_smile:

Ben

Hey Ben,

I’ve been using your method above to make a full column a link on several sites now. It works great, however there is a bit of CSS I can’t quite figure out.

I should mention that I am using the columns to link to anchors on the same page, so not sure if this has something to do with it. I have used the text decoration: none; to remove underlining on hover, however when clicking one of these column links to an anchor down the page, after scrolling back up I notice that the text is underlined.

I believe there is a pseudo class that is underlining the text in the column after it is clicked.

Can you help me resolve this so the text doesn’t get underlined after clicking?

Thanks,
David

Hey David,

Try using the :visited selector and see if that works. If it doesn’t, do you mind sharing the URL of the site in question so we can check?

Ben

I’ve been playing with this too, and it works great for me, so thanks very much.
One thing I have noticed is that ‘Link target in a new Window’ is not being recognized from the Callout settings.
But I’m not sure how to add ‘target="_blank"’ to the JQuery ?
I’m not sure if the callout setting can be looked at, or if we need two versions, one for each option?

TIA, Dave

Hey Dave,

We could make it so it picks up the Link Target setting under the Call To Action tab as well. Try setting that to New Window, then use the script below and see if it works.

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

Ben

Thanks Ben,
Worked a treat - thank you so much…
Dave

No worries at all, and glad I could help! Have fun! :slight_smile:

Ben