i wrote following directive allows me use maximgae plugin angular:
directives.directive('maximage', [ function() { return { link: function(scope, element, attr) { scope.$on('lastelem', function(event) { settimeout(function() { scope.$apply(function() { $(element).maximage({, cycleoptions: { fx: 'fade', speed: 800, timeout: 4000, end: function() { alert('the slideshow has ended.'); } } }); }); }); }); } } } ]); the problem end callback function not executed when slide ends.
this problem happens when try define cycle's options outside angular's scope with:
$.fn.cycle.defaults the other options timeout loaded without problems.
solved: mentioned in documentation nowrap or autostop options required trigger 'end' callback.
Comments
Post a Comment