Guidepopup
How do I make an guidepopup?
What is a guidepopup? How do you make a guidepopup? This script and codes were developed by JasonPark on 19 December 2022, Monday.
Guidepopup - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>guidepopup</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="size-guide">Size Guide</div>
<div id="guide-popup-wrapper"> <div id="guide-popup" data-ic="mm"> <div class="close">✖</div> <div class="size-guide-wrapper"> <div class="size-guide-title">Size Guide</div> <div class="size-metric-selector"> <ul> <li id="cm-selector" class="metric-btn active">CM</li> <li id="inch-selector" class="metric-btn">INCH</li> </ul> </div> <div class="guide-box"> <ul> <li class="width-box"> <div class="img-top"> <span id="bridge" class="metric" data-metric-value="10"></span> <span id="wid" class="metric" data-metric-value="30"></span> <span id="hei" class="metric" data-metric-value="34"></span> </div> <div class="title">Width</div> <div class="guide-description"> <p>Our frames are categorized as narrow, medium and wide to help you find your most comfortable pair of glasses. With our own measurement system, once you have YUN glasses, it will be easy to find your glasses which perfectly fit to you.</p> </div> </li> <li class="measurement-box"> <div class="img-top"> <span id="temple" class="metric" data-metric-value="34"></span> </div> <div class="title">Measurements</div> <div class="guide-description"> <p>Most of frame suppliers print the measurement of the frame on the inner side of the temple arm. If you already have some glasses, it could be helpful to compare this measurement to your favourite YUN frame. In this case you could figure out easily, whether the frame fits to you or not.</p> </div> <div class="img-bottom"> <span id="abbr-width" class="metric" data-metric-value="48"></span> <span id="abbr-bridge" class="metric" data-metric-value="20"></span> <span id="abbr-temple" class="metric" data-metric-value="35"></span> <span id="idc_1" class="indicator">A</span> <span id="idc_2" class="indicator">B</span> <span id="idc_3" class="indicator">C</span> </div> </li> </ul> </div> </div> </div>
</div> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Guidepopup - Script Codes CSS Codes
body { font-family: Roboto, sans-serif; font-size: 13px; margin:0; padding:0;
}
ul,
li { list-style: none; margin: 0; padding: 0;
}
.size-guide { font-size:100px;
}
p { margin:0; padding:0;
}
#guide-popup-wrapper{ display:none; position:absolute; width:100%; height:100%; top:0; left:0; background-color:transparent;
}
#guide-popup { margin: 0 auto; position: fixed; background-color: white; box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.30); right: 0; left: 0;
}
#guide-popup .size-guide-title { font-size: 15px;
}
#guide-popup .close { position: absolute; cursor:pointer; top: 10px; right: 10px; padding: 0;
}
.size-metric-selector { height: 35px; clear: both; margin-top: 10px; margin-bottom: 10px;
}
.size-metric-selector .metric-btn { border: 1px solid #263645; margin-left: -1px; margin-right: -1px; text-align: center; cursor: pointer; float: left; line-height: 2.3;
}
.metric-btn.active { background-color: #263645; color: white;
}
.guide-box .title { color:#919191; height:20px;
}
.guide-description { margin-bottom:15px;
}
.width-box { height: 300px;
}
.width-box .img-top{ background-image:url("http://www.yun-berlin.com/Themes/Tiffany/Content/img/SizeGuide/measurements_01.jpg");
}
#guide-popup .metric { display:none; position:absolute;
}
#guide-popup .indicator{ position:absolute;
}
#bridge.metric { top:7%; left:41%; right:50%;
}
#wid.metric { top:7%; left:62%; right:50%;
}
#hei.metric{ top:59%; left:93%;
}
#temple.metric{ top: 8%; left:47%;
}
.indicator { color:#bbb;
}
#abbr-width, #abbr-bridge, #abbr-temple { top:8%;
}
#abbr-width { left:30%;
}
#abbr-width:before{ content:'A : ';
}
#abbr-bridge{ left:55%;
}
#abbr-bridge:before{ content:'B : ';
}
#abbr-temple{ left:78%;
}
#abbr-temple:before{ content:'C : ';
}
#idc_1 { top:22%; left:72%;
}
#idc_2 { top:22%; left:80%;
}
#idc_3{ top:22%; left:84%;
}
#guide-popup[data-ic="\'\'"] #bridge.metric { left:43%;
}
#guide-popup[data-ic="\'\'"] #wid.metric{ left:64%;
}
#guide-popup[data-ic="\'\'"] #temple.metric{ top: 8%; left:50%;
}
.guide-box .img-top { position:relative; height: 135px; background-color: transparent; background-size:85% 80%; background-repeat:no-repeat; background-position:bottom;
}
.guide-box .img-bottom { position:relative; height: 135px; background-color: transparent;
}
.measurement-box { height: 400px;
}
.measurement-box .img-top { background-image:url("http://www.yun-berlin.com/Themes/Tiffany/Content/img/SizeGuide/measurements_02.jpg");
}
.measurement-box .img-bottom{ background-image:url("http://www.yun-berlin.com/Themes/Tiffany/Content/img/SizeGuide/measurements_03.jpg"); background-size:100% 78%; background-repeat:no-repeat; background-position:bottom;
}
@media all and (max-width:768px) { #guide-popup { width: 350px; padding: 20px; top: 3%; box-sizing:border-box; } .width-box { width: 100%; height:250px; } .measurement-box { width: 100%; } .size-metric-selector { width:100%; } .size-metric-selector ul li{ width:50%; }
}
@media all and (min-width:769px) { #guide-popup { width: 660px; height: 500px; padding: 30px; top: 15%; } .size-metric-selector .metric-btn { width: 100px; height: 30px; } .width-box { float: left; width: 49%; margin-right: 1%; } .measurement-box { float: left; width: 49%; }
}
Guidepopup - Script Codes JS Codes
(function(doc, win, $, undefined){ eventInitializer($);
})(document, window, $);
function eventInitializer($){ var eventFns = [ sizeGuideEventBinder, guideWraperEventBinder, closeBtnEventBinder, metricSelectorEventBinder, metricRenderer ]; eventFns.map(function(fn){ fn($); });
}
function sizeGuideEventBinder($){ $('.size-guide').click(function(e){ $('#guide-popup-wrapper').show(); });
}
function guideWraperEventBinder($){ $('#guide-popup-wrapper').click(function(e){ if(e.target === document.getElementById("guide-popup-wrapper")){ $(this).hide(); } })
}
function closeBtnEventBinder($){ $('#guide-popup .close').click(function(e){ $('#guide-popup-wrapper').hide(); });
}
function metricSelectorEventBinder($){ $('.size-metric-selector .metric-btn').on('click', function(e){ if($(e.target).hasClass('active')){ return; }else{ $(".metric-btn").toggleClass('active'); var curMetric = $('#guide-popup').attr('data-ic'); if(curMetric === 'mm'){ $('#guide-popup').attr('data-ic', '\'\''); }else{ $('#guide-popup').attr('data-ic', 'mm'); } metricRenderer($); } });
}
function metricRenderer($){ var curMetric = $('#guide-popup').attr('data-ic'); $('.metric').each(function(idx, elem){ $(this).hide(); $(this).css('opacity', 0); $(this).show(); $(this).fadeTo('slow', 1); var mVal = + $(elem).attr('data-metric-value'); if(curMetric === '\'\''){ mVal = Math.round((mVal / 25.4)*100)/100; } elem.innerHTML = mVal + curMetric; });
}
Developer | JasonPark |
Username | wooljs |
Uploaded | December 19, 2022 |
Rating | 3 |
Size | 3,747 Kb |
Views | 12,144 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Popup-modal | 2,308 Kb |
Counter Example 001 | 2,283 Kb |
Appointment DatetimePicker | 4,301 Kb |
Tic Tac Toe Game with React and Redux | 2,267 Kb |
Digital Calculator | 2,547 Kb |
Main-contents | 3,232 Kb |
Prescription | 9,016 Kb |
Lookbook module | 4,403 Kb |
YxT | 4,421 Kb |
Javascript Queue | 2,218 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Elon Musk - Tribute Page - FreeCodeCamp | Yunnimun | 8,615 Kb |
Beveled corners using CSS border attribute | DawsonMediaD | 2,136 Kb |
Material Design-Layout-Principles Practice | Fraina | 2,331 Kb |
Pomodoro Clock | Osycon | 3,705 Kb |
APortfolio | Skybutterfly | 5,174 Kb |
Scroll Arrow | Robooneus | 4,437 Kb |
CSS Tooltips | Darylldoyle | 2,599 Kb |
Fullscreen Parallax | Bassta | 3,313 Kb |
This in constructor context | _shree33 | 1,718 Kb |
Brian The CSS Bee | Jonitrythall | 3,922 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!