I am developing a jquery plugin that runs a series of functions, tasks will be autoplayed or run on human intervention.
Is it possible to do something like this?
For example:
$ ('selector'). BG Change ({name: 'A', callback). Wait for the callback before changing the BGM Change () // BGM. I know that I can do just that.
$ ('selector'). Bgchange ({name: 'you', function () {BGM Change}}}; But we are talking about hundreds (probably thousands) of the tasks.
Is there any way to do this?
Right now the solution I have come up with is something like that.
var events = [function () {$ ('# canvas'). Bgchange ({img: 'processing / bg / afternoon .png', fadeIn: true, autoplay: false, debug: "events1:"});}, function () {$ ('# canvas') Bgchange ({img: 'processing / bg / night time', 'FdeIn: true, autoplay: false, debug: "events2:"});}, function () {$ (' # canvas') BgChange ({img: 'processing / bg / afternoon noon'), feedin: true, bg change ({img: 'resources / bg / afternoon.png', fadeIn: true, autoplay: false, autoplay: wrong, debug: "event 3: "});}, function () debug $ $ ('# canvas'):" Event4: "});}, function () {$ ('# canvas'). Switches (Event2);}]; Each function plays using and
$ ('# canvas'). Is there any other great way to do this? Thanks a lot. It is not possible to issue chaining after the callback execution (
You '}, callback) .bgmChange ()
But you can use if you want a certain delay
No comments:
Post a Comment