Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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?

    #232186

    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

    #232222

    This doesn’t work on my webpage, i insert the code on the exact place as you suggested me.

    #232634

    But the title of the portfolio item is not clickable.. and nothing closes when i push on the title

    #234365

    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

    #235558
    This reply has been marked as private.
    #236473

    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

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.