Portfolio page : how to make portfolio items not trigger overlay

stardot's picture
stardot
Fri, 04/17/2015 - 13:57
#1
Portfolio page : how to make portfolio items not trigger overlay

Hello,

I have some items in the portfolio page that I do not wish to have the overlay triggered when clicked. How is the best way to do this? I've attempted to adjust the jquery onclick trigger, and the view template but I'd appreciate your insight!

Thanks

cindy's picture
cindy
Sat, 04/18/2015 - 04:49

Hi,

To disable ajax overlay, you can make some customisation in two files: custom.js and overlay.js
The two files are located in sites/all/themes/md_phoenix/js/front
- in file custom.js, search to the code:

 $("a.overlay-ajax").click(function(){
var url = $(this).attr("href").replace(/[#\!]/g, '' ).split("/")[1];
//$(".overlay-section").load(url + ' #transmitter');
portfolio_loadajax(url);
$( "body" ).addClass( "noscroll" );
$('.video').fitVids();
return false;
});


- in file overlay.js please search to the code:


$( ".portfolio-item" ).each(function() {
var id = $( this ).find('.overlay-ajax').attr('id');
document.getElementById( id ).addEventListener( 'click', toggleOverlay );
});

If you comment/delete the two code above, portfolio will not have overlay. You can add condition to set which items have overlay, which ones don't have

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.