-
AuthorPosts
-
December 10, 2013 at 1:41 pm #198529
Hi!
I asked this before through this thread: https://kriesi.at/support/topic/remove-lightboximage-link-from-ajax-preview/ and I found the solution here: https://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: testLook 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,
TomasDecember 12, 2013 at 11:05 am #199447Hey 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,
PeterDecember 12, 2013 at 12:13 pm #199457Hi!
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,
TomasDecember 12, 2013 at 12:23 pm #199460Hey!
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: https://kriesi.at/support/topic/remove-lightboxlink-from-ajax-preview-slider-again/#post-199447
Best regards,
PeterDecember 12, 2013 at 12:36 pm #199464That 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… :)
December 12, 2013 at 2:49 pm #199488Hi!
I replaced the element selector with a more specific one – please try the code I posted with my last answer again.
Best regards,
PeterDecember 12, 2013 at 3:35 pm #199500Hi again!
No difference Im afriad. I have cleared chache and reloaded but Im still not able to click to switch image.
Regards,
TomasDecember 12, 2013 at 4:01 pm #199514Hey!
I added another selector – please try it again.
Regards,
PeterDecember 12, 2013 at 8:21 pm #199599It 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: https://kriesi.at/support/topic/remove-lightboxlink-from-ajax-preview-slider-again/#post-199447?
December 13, 2013 at 8:48 am #199797Hi!
Yes, because we don’t want to remove the lightbox feature for all users ;-)
Regards,
Peter -
AuthorPosts
- The topic ‘Remove lightbox/link from ajax preview slider (again)’ is closed to new replies.