squeezebox ajax mootools

我的未来我决定 提交于 2019-12-13 05:30:56

问题


I use the modal window a fair bit in joomla and just found out that it doesn't work with ajax added links. What is the code I need to have the modal window work with those links?

I'm better at jquery than moo tools ...

Thanks,

Mat

I found this code but can't get it to work.

<script type="text/javascript">
window.addEvent('domready', function() {
   SqueezeBox.initialize({
    ajaxOptions: {
        evalScripts: true
    }
});
//SqueezeBox.initialize({});
   $$('a.modal').each(function(el) {
      el.addEvent('click', function(e) {
         new Event(e).stop();
         SqueezeBox.fromElement(el);
      });
   });
});

window.addEvent('domready', function() {

    window.addEvent('load', function(){

      //alert('clicked!');

      SqueezeBox.fromElement($('a.modal'));

    });

 });
</script>

回答1:


I use Rokbox (Mootools) from Rockettheme available for free here : http://www.rockettheme.com/extensions-downloads/club/1005-rokbox

A must have :)



来源:https://stackoverflow.com/questions/9287991/squeezebox-ajax-mootools

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!