squeezebox ajax mootools

2019-09-01 18:48发布

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条回答
地球回转人心会变
2楼-- · 2019-09-01 19:19

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

A must have :)

查看更多
登录 后发表回答