:nth-child() failing in ie7
-
$(xml).find('model').each(function(){
var $obj = $(this)
_model = $obj.find('data:nth-child(3)').text();
_fuelType = $obj.find('data:nth-child(5)').text();
_city_mpg = $obj.find('data:nth-child(6)').text();
_combined_mpg = $obj.find('data:nth-child(7)').text();
_hwy_mpg = $obj.find('data:nth-child(8)').text();
var values = _model + "," + _fuelType + "," + _city_mpg + "," + _combined_mpg + "," + _hwy_mpg;
var options = '<option value="' + values + '">' _model</option>';
$("select#model").append(options).attr("disabled", false);
});
'data:nth-child()' seems to throw an error in ie. I can get 'data:first' and this works fine but nth-child breaks it.
Anyone ever come across this in your travels?