160
rated 0 times
[
164]
[
4]
/ answers: 1 / hits: 27477
/ 11 Years ago, sat, january 4, 2014, 12:00:00
I have a input elements in html with two important attributes: id, and parentElementId.
I want to create a map/dictionary that looks like this: id : parentElementId.
var parent = $(.people-autocomplete).map( function(){ return $(this).attr('id')+':'+$(this).attr('parent'); }).get() ;
for know I'm putting the values into a string, which I parse later on in the code. I presume there is a more elegant solution than this.
More From » jquery