开发者

Cant seem to get this plugin to respond to my termination of the setTimeout. Any help?

开发者 https://www.devze.com 2023-02-01 01:58 出处:网络
The test can be found here. I would like to be able to pass my plugin a new option string of \'false\' and have my timer stop. http://www.jsfiddle.开发者_C百科net/j78nk/2/There is no element with the

The test can be found here. I would like to be able to pass my plugin a new option string of 'false' and have my timer stop. http://www.jsfiddle.开发者_C百科net/j78nk/2/


There is no element with the class gallery2 on that page, so pressing the button won't do anything.

Also, you are not checking the set options, only the defaults. And you return right away, before you do anything:

            if (!defaults.running) {
                return;
                console.log('timer is inactive');
            }

That code needs to be:

            if (!options.running) {
                console.log('timer is inactive');
                return;
            }
0

精彩评论

暂无评论...
验证码 换一张
取 消