tags:

views:

16

answers:

1
A: 

try this

if ($.browser['opera']) {
   var $inputs = $("form input").each(function() {
     $(this).val('opera');
   }
} else if ($.browser['mozilla']) {
   var $inputs = $("form input").each(function() {
     $(this).val('mozilla');
   }
}

Update

var ids = $.map($("form input"), function(elem, i) {
   return $(this).attr('id');
});
alert('all ids = ' + ids.join(','));
jcubic
It's not about the browser check, that works. I just want to get the values of the id attribute of the input elements. :)
Maurice