jQuery Tutorial Tutorials - jQuery .map() method

jQuery .map() method

The .map(callback) method in jQuery is used to produce a new jQuery object through a callback functions.

jQuery .map() method Syntax

.map(callback)

jQuery .map() method Example

example

Get the data of a collection of elements.

$( "li" )
  .map(function() {
    return $(this).data('type');
  })
  .get()
  .join();

Try now

Date:2019-08-26 13:54:27 From:www.Lautturi.com author:Lautturi