Make a BB Column Clickable
/** | |
* Makes a BB Column clickable. | |
* Pre-requisite: There must be an A Tag contained within the column element. | |
*/ | |
(function($){ | |
// Exit if BB layout is in edit mode. | |
if ( 'undefined' != typeof window.FLBuilderConfig ) { | |
return; | |
} | |
$('.clickable-col').css('cursor', 'pointer'); | |
$('.clickable-col').on('click', function(event){ | |
$(this).find('a')[0].click(); | |
}); | |
$('.clickable-col a').on('click', function(event){ | |
event.stopPropagation(); | |
}); | |
})(jQuery); |
This comment has been minimized.
This comment has been minimized.
Yes, @zackpyle. You need to add the class name "clickable-col" to the target column. Thanks for your inputs. |
This comment has been minimized.
This comment has been minimized.
@carlosonweb Suggested update to the targeting as to not happen during editing w/ BB - this becomes quite annoying!
|
This comment has been minimized.
This comment has been minimized.
Good catch @zackpyle. Thanks for your input. We can also check for
I'm updating the code to this:
|
This comment has been minimized.
This comment has been minimized.
👍🏻 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
It isn't explicitly stated in that gist, but you have to add a class of clickable-col to that column you want this to apply to