-
AuthorPosts
-
March 4, 2014 at 11:21 am #232136
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?
March 4, 2014 at 1:53 pm #232186Hi 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!
IsmaelMarch 4, 2014 at 2:48 pm #232222This doesn’t work on my webpage, i insert the code on the exact place as you suggested me.
March 5, 2014 at 10:10 am #232634But the title of the portfolio item is not clickable.. and nothing closes when i push on the title
March 9, 2014 at 10:06 am #234365Hey!
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,
PeterMarch 11, 2014 at 3:50 pm #235558This reply has been marked as private.March 12, 2014 at 7:01 pm #236473Hey!
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 -
AuthorPosts
- You must be logged in to reply to this topic.
