I am trying to retrieve and loop through all the elements on my page which are spans and have name tag. Any ideas?
$("span[name$='*']").each(function () { // first pass, create name mapping
// Console.log(this);
//name_map[name] = (name_map[name]) ? name + "[]" : name;
});
<span class="col-xs-2 control-label" name="toddler">xxx</span> <-- get this
<span class="col-xs-2 control-label">xxx</span> <-- don't get this