JavaScript preprocessors can help make authoring JavaScript easier and more convenient. For instance, CoffeeScript can help prevent easy-to-make mistakes and offer a cleaner syntax and Babel can bring ECMAScript 6 features to browsers that only support ECMAScript 5.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
HTML Settings
Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Market place - Viniexport</title>
</head>
<body>
<div class="container-fluid">
<!---Wine Box-->
<div class="wineBox">
<!---Wine Box Col Left-->
<div class="wineBoxColLx">
<div class="zoomWineLabel">
<div class="pull-right"><i class="fa fa-plus-square pull-right" data-toggle="modal" data-target="#zoomImageModal"></i>
</div>
<div class="wineLabelBox">
<div class="wineLabelBoxBg img-fluid" style="background-image:url('http://www.viniexport.com/trading/storage/2017/January/week4/60273_RUBRATO-AGLIANICO.png');"> </div>
<a href="#">Product Sheet</a>
</div>
</div>
</div>
<div class="wineBoxColRx">
<div class="wineName">Rubrato<br><small>Campania</small></div>
<div class="winePrice">$ 5.52<span class="vatSpan">+Vat</span></div>
<!---Div1-->
<!--onmouseover=switchVisible()-->
<div class="buy-button" >ADD TO CART <i class="fa fa-shopping-cart"></i> </div>
<div class="rsBuyNowContainer" style="">Select quantity :<div class="rsQuantityContainer"><input type="number" name="quantity_bottle" value="1" min="1" step="1" class="rsQuantity wineQuantity"><input type="hidden" class="rsPrice" name="prezzo_vendita" value="18.45"><input type="hidden" name="etichetta_id" value="80388"><input type="hidden" name="quantita_per_contenitore" value="1"> <img src="http://www.viniexport.com/trading/vximg/wineBottleIcon.png" class="wineBottleIcon"></div><div class="rsPriceSummary">Subtotal <span class="rsTotalBottles">3</span><br>Bottles: <strong>$</strong> <span class="rsTotalPrice">55.35</span></div><div class="rsBuyButton">ADD TO CART <i class="fa fa-shopping-cart"></i></div></div>
</div>
<div class="clearfix"></div>
<div class="winemakerName" title="Mezzacorona">Mezzacorona</div>
</div>
<div class="modal fade" id="zoomImageModal" tabindex="-1" role="dialog" aria-labelledby="zoomImageModalLabel"><div class="modal-dialog" role="document"><div class="modal-content modal-content-bg"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body"></div></div></div></div>
</div>
</body>
* {
box-sizing: border-box;
}
body {
font-family: 'Lato', 'Open Sans', 'Lucida Grande', Verdana, Tahoma, Arial, sans-serif !important;
font-size: 14px !important;
text-align: center;
}
img {
vertical-align: middle;
}
.wineBox {
min-width: 350px;
height: 220px;
margin: 10px;
padding: 10px;
background-color: #fcfcfc;
border: 1px solid #dadada;
border-radius: 5px;
display: inline-block;
}
.wineBoxColLx, .wineBoxColRx {
width: 50%;
float: left;
}
.wineBox .wineName {
font-family: 'Lato', sans-serif !important;
font-size: 14px;
color: #444;
font-weight: 300;
width: 150px;
height: 105px;
margin: 0 auto;
line-height: 16px;
}
.wineName {
padding: 2px 2px 2px 10px;
border-radius: 3px;
}
.wineBox .buy-button {
width: 150px;
font-size: 12px;
font-weight: 300;
padding: 3px;
background-color: #2285bb;
border: 0 none;
border-radius: 5px;
color: #ffffff;
cursor: pointer;
margin-left: 11.5px;
margin-top: -2px;
}
.rsBuyNowContainer {
background-color: rgba(255,255,255,1);
border-radius: 5px;
height: 178px;
margin-left: 3.5px;
margin-top: -175px;
padding: 5px;
position: absolute;
width: 165px;
text-align: center;
color: #444444;
font-family: "Lato",sans-serif !important;
font-size: 14px;
font-weight: 300;
z-index: 1000;
}
.rsQuantity {
border: 1px solid #2285bb !important;
width: 130px;
color: #444;
margin-top: 5px;
}
.wineBox .wineName small {
color: #888;
}
.rsPriceSummary {
text-align: center;
color: #444444;
font-family: "Lato",sans-serif !important;
font-size: 14px;
font-weight: 300;
margin-top: 20px;
}
.rsBuyButton {
width: 150px;
font-size: 12px;
margin: 0 auto !important;
background-color: #2285bb;
border: 0 none;
border-radius: 5px;
color: #ffffff;
cursor: pointer;
}
.wineBottleIcon {
height: 28px;
width: auto;
margin-left: 3px;
margin-top: 1px;
position: absolute;
}
div {
display: block;
}
.fa.fa-plus-square{
color:#2285bb!important;
}
.wineBox .winePrice {
font-family: 'Lato', sans-serif !important;
font-size: 22px;
color: #444;
font-weight: 400;
margin: 0 auto;
}
.vatSpan {
background-color: #ececec;
border-radius: 2.5px;
color: #444;
font-size: 9px;
font-weight: 400;
line-height: 16px;
margin-left: 3px;
margin-top: 10px;
position: absolute;
text-transform: uppercase;
width: 35px;
}
.wineLabelBoxBg:hover{
transform: scale(2.5); /* (150% zoom - Note: if the zoom is too large, it will go outside of the viewport) */
}
.zoomWineLabel {
color: #2285bb;
padding: 5px;
cursor: pointer;
}
.pull-right {
float: right!important;
}
.wineLabelBoxBg {
width: 150px;
height: 150px;
background-size: contain;
background-position: center;
background-repeat: no-repeat;
transition: all .45s ease-in-out;
}
.wineLabelBox {
width: 150px;
height: 150px;
margin: 0px auto;
margin-bottom: 5px;
background-color: #fff;
border-radius: 5px;
overflow: hidden;
}
.wineBoxColLx {
border-right: 1px solid #dadada;
}
.winemakerName {
color: #444444;
font-family: "Lato",sans-serif !important;
font-size: 12px;
font-weight: 300;
text-align: bottom;
margin-left: 7px;
margin-right: 7px;
background-color: #ececec;
border-radius: 3px;
margin-top: 0px;
}
$(".buy-button").mouseover(function(){
$(".wineName").hide();
$(".rsByNowContainer").show();
});
$(".buy-button").mouseleave(function(){
$(".rsByNowContainer").hide();
$(".wineName").show();
});
/*$(function(){
$('.buy-button').hover(function() {
$('#Div1').addClass('hover');
}, function() {
$('#Div2').removeClass('hover');
})
})*/
/*
('.buy-button').hover(
function () {
$("#Div1").show();
},
function () {
$("#Div2").hide();
}
);
*/
function switchVisible() {
if (document.getElementById('Div1')) {
if (document.getElementById('Div1').style.display == 'none') {
document.getElementById('Div1').style.display = 'block';
document.getElementById('Div2').style.display = 'none';
}
else {
document.getElementById('Div1').style.display = 'none';
document.getElementById('Div2').style.display = 'block';
}
}
}
Also see: Tab Triggers