Skip to content

Instantly share code, notes, and snippets.

@neilgee
Last active October 2, 2019 11:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neilgee/89b7a769e707a77c0d42de0c957b5084 to your computer and use it in GitHub Desktop.
Save neilgee/89b7a769e707a77c0d42de0c957b5084 to your computer and use it in GitHub Desktop.
Beaver Builder Wrap Column in Link Tag with jQuery
(function($){
$(function() {
clickColumn();
});
/*
* Make a BeaverBuilder Column clickable.
* There must be a link tag in the column element.
* Add the CSS class .click-col in the Column Settins Advanced Tab CSS value
*/
function clickColumn() {
$('.click-col').css('cursor', 'pointer');
$('.click-col').on('click', function(event){
$(this).find('a')[0].click();
});
$('.click-col a').on('click', function(event){
event.stopPropagation();
});
}
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment