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()
More Related Contents:
- jQuery 1.9 .live() is not a function
- How can I create an Asynchronous function in Javascript?
- How to add an object to an array
- How to find if an array contains a specific string in JavaScript/jQuery?
- How does this object method definition work without the “function” keyword?
- Is there a way to create a function from a string with javascript?
- Is there currently anyway to concatenate two or more string literal types to a single string literal type in TypeScript right now?
- How do I check if string contains substring? [duplicate]
- Remove whitespace and line breaks between HTML elements using jQuery
- jQuery: difference between .click() AND .on(“click”)
- Wrap tags around http text
- Method vs Functions, and other questions
- functions inside or outside jquery document ready
- Get the weekday from a Date object or date string using JavaScript
- Convert javascript array to string
- Split a string based on multiple delimiters
- How to trim() white spaces from a string?
- Insert space before capital letters
- How Can I Truncate A String In jQuery?
- includes() not working in all browsers
- Javascript / Jquery – Get number from string
- How to test if a URL string is absolute or relative?
- What is the purpose of this? (function ($) { //function code here })(jQuery);
- How to check if a string is a legal “dd/mm/yyyy” date?
- JQuery string contains check [duplicate]
- Passing parameters to a JQuery function
- jQuery asynchronous function call, no AJAX request
- Function not calling within an onclick event
- Find and replace nth occurrence of [bracketed] expression in string
- Does jQuery strip some html elements from a string when using .html()?