Skip to content

Instantly share code, notes, and snippets.

@dmzza
Created April 23, 2013 23:42
Show Gist options
  • Save dmzza/5448397 to your computer and use it in GitHub Desktop.
Save dmzza/5448397 to your computer and use it in GitHub Desktop.
$(function() {
$("input").each(function(i) {
streets = "Myrtle Ave and Hart St";
street = streets.split(" and ");
switch(i) {
case 0:
$(this).val(203.0);
break;
case 1:
$(this).val(400);
break;
case 2:
$(this).val("something");
break;
case 3:
case 11:
$(this).val("Bushwick");
break;
case 8:
$(this).attr('checked', 'checked');
break;
case 9:
$(this).val(street[0]);
break;
case 10:
$(this).val(street[1]);
break;
case 12:
$(this).val("NY");
break;
}
});
$("select").val(2.0);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment