You can use the bracket notation to access the member with a string containing the identifier:
var target="next";
$("foobar")[target](); // identical to $("foobar").next()
You can use the bracket notation to access the member with a string containing the identifier:
var target="next";
$("foobar")[target](); // identical to $("foobar").next()