JSFiddle - React, Tailwind, and code Playground
by joaoManolo
HTML
<div class="col-sm-6">
<div class="well-media">
<div class="vendor">
<iframe width="100%" height="300px" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?layer=c&panoid=_3BG0a4MYf8AAAQXIE1gSA&ie=UTF8&source=embed&output=svembed&ll=-3.07891%2C-60.038074&cbp=13%2C15.413599999999917%2C%2C0%2C0"></iframe>
</div>
</div>
<div class="video-text">
<h2>Link do StreetView</h2>
<div class="tag-nest">
<input type="text" placeholder="Link Street View" class="form-control" />
</div>
</div>
</div>
CSS
/* maki */
[class*="maki-"]:before {
font-family:'maki', sans-serif;
}
/* entypo */
[class*="entypo-"]:before {
font-family:'entypo', sans-serif;
}
/* fontawesome */
[class*="fontawesome-"]:before {
font-family:'FontAwesome', sans-serif;
}
body {
color: #9ea7b3!important;
font-family:"Open Sans", Arial, sans-serif!important;
font-size: 13px!important;
line-height: 20px;
overflow-x: hidden!important;
min-height: 100%;
z-index: -2;
margin: 0px !important;
background: url('../img/bg.jpg') no-repeat top center fixed;
-moz-background-size: cover;
-webkit-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
/*
PREALOADER
*/
a:hover {
text-decoration: none!important;
}
#preloader {
background: transparent;
\9;
/* IE 8 and below */
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(37, 45, 59, 0.8);
/* change if the mask should have another color then white */
z-index: 2000;
/* makes sure it stays on top */
/* background-image: url("../img/overlays/06.png");
background-repeat: repeat; */
}
#mapContainer {
font-family: sans-serif;
background: #fff;
color: #444;
height: 100%;
padding: 0;
margin: 0;
}
#logo {
left: 19px;
position: relative;
top: -34px;
max-width: 191px;
}
#logo-mobile {
left: -33px;
position: absolute;
top: -14px;
z-index: 0;
}
#logo h1, #logo-mobile h1 {
font-size: 30px;
font-weight: 200;
letter-spacing: -1px;
text-decoration: inherit;
text-transform: uppercase;
color: #fff;
}
#logo h1 span, #logo-mobile h1 span {
background: none repeat scroll 0 0 rgba(0, 0, 0, 0.2);
border-radius: 3px;
font-size: 11px;
margin-left: 0;
padding: 0 5px;
position: relative;
top: -3px;
}
/**
* BOOTSRAP COUSTOM
*/
.container-fluid {
padding-left: 0!important;
padding-right:...
JavaScript
$('.form-control').change(function () {
alert("Entrou no Metodo!!!");
var inputValue = $(this).val();
if (inputValue !== null || inputValue !== "") {
var heightFormated = alterHeight(inputValue);
var widthFormated = alterWidth(heightFormated);
if ($('.vendor > iframe').length) {
$(".vendor").empty();
}
$('.vendor').append(widthFormated);
}
function alterHeight(input) {
var heightVar = /.*height=\"(.+?)\".*/;
var x = heightVar.exec(input);
var foo = "height=\"" + x[1] + "\"";
var replacedHeight = inputValue.replace(foo, "height=\"300px\"");
return replacedHeight;
}
function alterWidth(input) {
var widthVar = /.*width=\"(.+?)\".*/;
var y = widthVar.exec(input);
var xpto = "width=\"" + y[1] + "\"";
var replacedWidth = input.replace(xpto, "Width=\"100%\"");
return replacedWidth;
}
});