Avatar miha007 asked

Ajax & WidgetKit

Hello.

I'm using FullAjax component (Link to the component) for my website (created my own template) and it works perfectly since the website only displays content. I'd like to use WidgetKit for "gallery" and lightbox effect and it works until you refresh it using ajax component. After that refresh it just opens picture in a new link (like JS doesn't work). I tried using this fix, but it doesn't work - probably because widgetkit is powered by jQuery. Because i think that the problem is that JS doesn't recognize when AJAX loaded a new DOM i'd like to know what to type to call the widgetkit to reload itself (initialize) - similar to the tutorial for mootools lightbox...

The website is: http://webstran.info/natalija

Thank you for help.

  • Joomla
  • Widgetkit
  • General Question

Edited

4 Answers

1

Avatar morgan.gustafsson answered

Call $widgetkit.lazyload(); once all content is loaded. I'm using this on several projects and it works.

I'm having issues with this technique when it comes to the spotlight effect.

0

Avatar mustaq Yootheme answered

I am not aware of a workable solution to your problem at this stage.

YOOgards

0

Avatar miha007 answered

FLAX.Html.onall('load', function(o){    
   $widgetkit.lazyload();  
}); 

Tried that already. It doesn't seem to work. I've noticed that widgetkit lightbox is based on fancybox. I wonder which version is it based on? - Because on google groups FancyBox support team told me:

if using fancybox v1.3.4 check this http://stackoverflow.com/a/9084293/1055987

you shouldn't have any issue using fancybox v2.x

I've noticed there is a new version of WidgetKit, 1.1.1. - are there any possible bugfixes (or updated fancybox script) I could use?

Thank you

Edited

0

Avatar josef.englmeier answered

I am also using FullAjax and some widgets.

After installing the Ajax Component the widgets did not work any more and I could fix most of them with this code
FLAX.Html.onall('load', function(o){
$widgetkit.lazyload();
});

Unfortunately the image galleries are still not working (style "wall, effect "polaroid"). After clicking on one of the polaroids, the image will get loaded as new page and not in the lightbox.

What can I do?

Thanks :)

Know someone who can answer? Share a link to this question via email or twitter.