How can I make this simpler?:
var address = jQuery.trim($("#Address1").val()) + " " + jQuery.trim($("#City").val()) + " " + jQuery.trim($("#State").val()) + " " + jQuery.trim($("#Zip").val());
Try this:
var address = "";
$("#Address1, #City, #State, #Zip").each(function(){
address += $.trim($(this).val()) + " ";
});
If you are looking for the form text inputs then you can make it simpler as given below:
var address = "";
$(":text").each(function(){
address += $.trim($(this).val()) + " ";
});