Raphael not running callback parameter

429 views Asked by At

After loading Raphael with yepnope, I try to run Raphael with the callback parameter-- as per the following section:

http://raphaeljs.com/reference.html#Raphael

Example code:

    yepnope({
        load: 'lib/raphael.js',
        complete: function () {
            Raphael('idm', 10, 10, function () {alert('callback run!')});
        }
    });

Unfortunately, the callback doesn't run in Firefox and IE. It does run in Chrome. What can I do to make the callback run in all browsers?

1

There are 1 answers

1
Tung Dang On

I also have this problem. When loading async script by YepNope, callback function don't not run in IE 8 ,9. But firefox and chrome are fine. So I decide to include js file by 'script' tag. Though it make loading time is slower.