var test1;
$(document).ready(function () {
test1 = $("#test1ID").jQueryPlugin();
});
var test2;
$(document).ready(function () {
test2 = $("#test2ID").jQueryPlugin();
});
...
This is done so we could just do `test1.foo()`... foo is a function inside the jQueryPlugin that is accessible using `test1.foo()` syntax;
So we have an array of strings which contains (test1, test2, ...)
and we need to access foo() while on the loop:
for(i=0; i
以上就是How to convert a string value to a variable in javascript?的详细内容,更多请关注web前端其它相关文章!