English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The map() method is used to pass each element in the current matching set through a function, thus generating a new jQuery object containing the returned values.
You can use this method to build a list of values, attributes, CSS values-Even perform special, custom selector transformations.
$.map(selector, callback)
Build a list of all values in the form:
$("p").append($("input").map(function(){ return $(this).val(); }).get().join(", "));Test See‹/›
Parameter | Description |
---|---|
callback | Specify the function object to be called for each element in the current set |