How to execute your javascript/jquery code with Crocoblock’s JetSmartFilters
Recently I had to add some custom javascript/jquery code to a JetSmartFilter select filter in order to have a map show the relevant pins/markers. Since there is absolutely 0 documentation on how to add your own code I spent a few hours and I finally managed to get it right. Here is a working snippet.
function myCode() {
alert('content rendered');
}
jQuery(document).on('jet-filter-content-rendered', function() {
myCode();
});
That’s it! Let me know if it worked or if you had any problems in the comments.
Post Views: 372