The plugins site is currently in development.
We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.
Change callback "eval" to an actual function
| Project: | jQuery Countdown Plugin |
| Version: | 0.1 |
| Component: | Code |
| Category: | task |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | active |
Very minor request, but it seems that for this method it would make more sense to pass the callback as an actual function rather than a string to later be evaluated.
Line 28:
if(options.callback) options.callback();rather than
if(options.callback) eval(options.callback);This way you can either code the callback in-line or pass it by reference:
$('span.countdown').countdown({seconds: 30, callback: function() {
alert('hello world');
});- Login to post comments
