jQuery('.pricefield select','.pricefield input').each
(jQuery(this).change (function (){
alert(jQuery(this).attr("type")); //it give undefined
alert(jQuery(this).is(':input')); //it gives false
var allInputs = jQuery(":input");
alert(allInputs.attr('type')); //it gives hidden
get_sum();
}
));
How can I can identify the field type as select or radio or checkbox?
.eachexpects a callback but you're passing a jQuery collection. Can you post a demo to reproduce the issue?