});
input.on("keydown", function() {
- input.css("background-color", "#fff");
+ input.removeClass("highlight_error");
});
input.on("change", function (e) {
endpoint.hasGeocode = true;
if (json.length === 0) {
alert(I18n.t('javascripts.directions.errors.no_place', {place: endpoint.value}));
- input.css("background-color", "rgba(255, 0, 0, 0.5)");
+ input.addClass("highlight_error");
return;
}
border-radius: 0 2px 2px 0;
}
+ input.highlight_error {
+ background-color: rgba(255, 0, 0, 0.5);
+ }
+
select {
/* this next line is to polyfill the vertical alignment of text within a select element,
* which is different between firefox and chrome. */