Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #198529

    Hi!

    I asked this before through this thread: http://www.kriesi.at/support/topic/remove-lightboximage-link-from-ajax-preview/ and I found the solution here: http://www.kriesi.at/support/topic/disable-lightbox-on-ajax-portfolio-featured-image-only/

    The solution in the second thread is this:

    You need to replace following code in avia.js:

    $.avia_utilities.avia_ajax_call = function(container)
    {
    with

    $.avia_utilities.avia_ajax_call = function(container)
    {

    jQuery(‘.portfolio_preview_container .portfolio-preview-image’).find(‘img’).unwrap();

    The problem is that this solution causes a error when switching through the ajax previews. Have a look here: http://agwp.agarkitekter.se/projekt/
    Username: test
    Password: test

    Look at the 4 portfolios in a row that have a slider (“Enskede Park” – “Järven” – “Storängen” – “Gaia”). If you click on one of them and then with the arrows go back and fourth through the 4 portfolios, the slider is broken pretty often and instead the images just line up. When I remove the code above, I get no error. Is there any other way of remove the lightbox (I don’t want any link at all from on the slider), or any suggestion why this causes the sliders to be broken?

    Regards,
    Tomas

    #199447

    Hey agarkitekter!

    If the code doesn’t work for you please remove it and replace

    
            //activates the prettyphoto lightbox
            $(container).avia_activate_lightbox({callback:'avia_lightbox_callback'});
    

    with

    
    jQuery('.portfolio_preview_container .portfolio-preview-image .avia-slideshow').find('a').addClass('avianolink noLightbox');
    
            //activates the prettyphoto lightbox
            $(container).avia_activate_lightbox({callback:'avia_lightbox_callback'});
    

    Best regards,
    Peter

    #199457

    Hi!

    That code removes the lightbox and don’t cause any problems with the slider. But the slider images is still a link (opens up in a new window). I would like the link to be removed completely.

    Regards,
    Tomas

    #199460

    Hey!

    Strange – please try to use following code instead

    
    jQuery('.portfolio_preview_container .portfolio-preview-image .avia-slideshow .avia-slideshow-inner').find('a').addClass('avianolink noLightbox');
    $('a.avianolink').on('click', function(){return false;});
    
            //activates the prettyphoto lightbox
            $(container).avia_activate_lightbox({callback:'avia_lightbox_callback'});
    

    I’ll move the “avianolink” function into the ajax callback function with the next theme update – then you just need to use the code I posted here: http://www.kriesi.at/support/topic/remove-lightboxlink-from-ajax-preview-slider-again/#post-199447

    Best regards,
    Peter

    #199464

    That removed the link… but unfortunately it also removed the possibility to switch between images in the slider, both with the arrows and with the circles at the bottom of the slider… :)

    #199488

    Hi!

    I replaced the element selector with a more specific one – please try the code I posted with my last answer again.

    Best regards,
    Peter

    #199500

    Hi again!

    No difference Im afriad. I have cleared chache and reloaded but Im still not able to click to switch image.

    Regards,
    Tomas

    #199514

    Hey!

    I added another selector – please try it again.

    Regards,
    Peter

    #199599

    It works now, thank you very much! Great support as always here.

    One question though, when the next theme update comes, do I still just have to use the code in this post: http://www.kriesi.at/support/topic/remove-lightboxlink-from-ajax-preview-slider-again/#post-199447?

    #199797

    Hi!

    Yes, because we don’t want to remove the lightbox feature for all users ;-)

    Regards,
    Peter

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Remove lightbox/link from ajax preview slider (again)’ is closed to new replies.