Hi,
I am using the Ajax portfolio preview and i was wondering if it was possible to also let it close again when i click on the title, instead of always having to use the “x” marked in the right top?
Hi Benjaminlivingthebrand!
Edit config-templatebuilder > avia_shortcodes > portfolio.php, find this code on line 623:
$output .= "<h2 class='portfolio-preview-title entry-title' $markup><a href='{$link}'>".$entry->post_title."</a></h2>";
Replace it with:
$output .= "<h2 class='portfolio-preview-title entry-title' $markup><a href='#close'>".$entry->post_title."</a></h2>";
Cheers!
Ismael
This doesn’t work on my webpage, i insert the code on the exact place as you suggested me.
But the title of the portfolio item is not clickable.. and nothing closes when i push on the title
Hey!
Revert the code change Ismael suggested in his last post and insert this code at the very bottom of enfold/js/avia.js:
(function($){
$(document).on( "click", '.portfolio-preview-title.entry-title', function(e) {
$(this).parents('.portfolio_preview_container').find('.avia_close').trigger( "click" );
e.preventDefault();
});
})( jQuery );
Best regards,
Peter
Hey!
Make sure to first undo the changes to the portfolio.php file. Then add the javascript snippet from Peter to your avia.js file. If that doesn’t work then you can request that the feature be added in by Kriesi in the feature request topic here: https://kriesi.at/support/topic/enfold-feature-requests/
Best regards,
Devin