Slide 26
Slide 26 text
Ralph Whitbeck
JQUERY 1.6 $.MAP() ENHANCEMENT
//In
jQuery
1.6,
it
is
now
possible
to
use
jQuery.map()
to
map
objects
into
a
new
array
of
items.
Previously,
this
only
took
in
other
arrays.
names
=
{
firstname:
"Elijah",
lastname:
"Mannor",
age:
"OLD"};
names
=
jQuery.map(names,
function(v)
{
return
v.toLowerCase();
});
//
returns:
["elijah",
"manor",
"old"]