.container {
margin-top: 20px;
}
@charset "UTF-8";
/*==================================================
= Bootstrap 3 Media Queries =
==================================================*/
/*========== Mobile First Method ==========*/
/* Custom, iPhone Retina */
/* Extra Small Devices, Phones */
/* Small Devices, Tablets */
/* Medium Devices, Desktops */
/* Large Devices, Wide Screens */
/*========== Non-Mobile First Method ==========*/
/* Large Devices, Wide Screens */
/* Medium Devices, Desktops */
/* Small Devices, Tablets */
/* Extra Small Devices, Phones */
/* Custom, iPhone Retina */
/*=====================================================
= Bootstrap 2.3.2 Media Queries =
=====================================================*/
/* default styles here for older browsers.
I tend to go for a 600px - 960px width max but using percentages
*/
@media only screen and (min-width: 960px) {
/* styles for browsers larger than 960px; */
}
@media only screen and (min-width: 1440px) {
/* styles for browsers larger than 1440px; */
}
@media only screen and (min-width: 2000px) {
/* for sumo sized (mac) screens */
}
@media only screen and (max-device-width: 480px) {
/* styles for mobile browsers smaller than 480px; (iPhone) */
}
@media only screen and (device-width: 768px) {
/* default iPad screens */
}
/* different techniques for iPad screening */
@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation: portrait) {
/* For portrait layouts only */
}
@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation: landscape) {
/* For landscape layouts only */
}
/*******Nuevos mensajes de error******/
.new-message-box {
margin: 15px 0;
padding-left: 20px;
margin-bottom: 25px !important;
}
.new-message-box p {
font-size: 1.15em;
font-weight: 600;
}
.info-tab {
width: 40px;
height: 40px;
display: inline-block;
position:...
JavaScript
var placeSearch, autocomplete, map, geo;
var componentForm = {
subpremise: 'short_name',
street_number: 'short_name',
route: 'long_name',
sublocality_level_1: 'short_name',
locality: 'long_name',
administrative_area_level_1: 'short_name',
country: 'short_name',
postal_code: 'short_name'
};
var componentInputs = {
sublocality_level_1: 'addressLine2Input',
locality: 'cityInput',
administrative_area_level_1: 'provinceInput',
country: 'countryCodeInput',
postal_code: 'postCodeInput'
};
var BreakException = {};
var regex = /^.*(po\s*box|private\s*bag).*$|^\d[\/a-zĀ-ū0-9\s\,\'\-]*$/i;
/** @start HTML5 form validation **/
let fulladdress = document.getElementById('addressLine1Input');
fulladdress.onblur = validate;
fulladdress.setAttribute("pattern", "\\d[/a-zA-ZĀ-ū0-9\\s',-]*");
fulladdress.addEventListener('input', () => {
fulladdress.setCustomValidity('');
fulladdress.checkValidity();
});
fulladdress.addEventListener('invalid', () => {
fulladdress.setCustomValidity('No PO Box or Private Bag address must start with a number, e.g. 1/311 Canaveral Drive');
});
/** @end HTML5 form validation **/
function getValue() {
return document.getElementById("addressLine1Input").value;
}
function validateAddress() {
var str = getValue();
var match = str.match(regex);
var tooltip = document.getElementById("notification");
var msg = document.getElementById("msg");
if (match && !match[1]) {
// valid address
msg.innerHTML = "<p>Address looks to be valid</p>";
tooltip.style.display = 'none';
} else {
// invalid address
msg.innerHTML = "<p>Invalid address (No PO Box or Private Bag address must start with a number, e.g. 1/311 Canaveral Drive)</p>";
tooltip.style.display = 'block';
}
}
function initAutocomplete() {
// Create the autocomplete object, restricting the search to geographical
// location types.
autocomplete = new google.maps.places.Autocomplete(
/** @type {!HTMLInputElement} */
...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.