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.
<body>
<!-- UL Line Ad -->
<div class="container square-size">
<section id="lineAd" class="line-ad">
<svg id="ulLogo" class="ul-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 35 35"><title>ul-logo</title><path d="M35 17.5A17.5 17.5 0 1 1 17.5 0 17.5 17.5 0 0 1 35 17.5M17.5 3.1a14.4 14.4 0 1 0 14.4 14.4A14.4 14.4 0 0 0 17.5 3.1M26.3 24h-3.6V13.3h-3.2V27h6.8v-3zm-9-15.9h-3.1v10.2a1.1 1.1 0 0 1-1 1.2h-.1a1.1 1.1 0 0 1-1.1-1.1V8.2H8.9v10c0 2.5 1.9 3.8 4.2 3.8s4.2-1.3 4.2-3.8v-10z" fill="rgb(255, 255, 255)"/></svg>
<div class="content">
<svg xmlns="http://www.w3.org/2000/svg" class="line" viewBox="0 0 302 1.4"><path id="line" fill="none" stroke="#ffffff" stroke-miterlimit="10" stroke-width="1.434" d="M0 .7h300"/></svg>
<p class="center" id="start">Compliance</p>
<p class="top" id="first">New Market Entry</p>
<p class="bottom" id="second">Audit Readiness</p>
<p class="top" id="third">Competency<br>Development</p>
<p class="bottom" id="fourth">Culture of Quality</p>
<p class="top" id="fifth">Operational<br>Excellence</p>
<p class="bottom" id="sixth">Risk Reduction</p>
<p class="center" id="end">Performance</p>
</div>
</section>
<section id="ulMainAd" class="main-ad">
<div class="content">
<svg id="ulLogo" class="ul-logo" xmlns="http://www.w3.org/2000/svg" width="35" height="35" viewBox="0 0 35 35"><title>ul-logo</title><path d="M35 17.5A17.5 17.5 0 1 1 17.5 0 17.5 17.5 0 0 1 35 17.5M17.5 3.1a14.4 14.4 0 1 0 14.4 14.4A14.4 14.4 0 0 0 17.5 3.1M26.3 24h-3.6V13.3h-3.2V27h6.8v-3zm-9-15.9h-3.1v10.2a1.1 1.1 0 0 1-1 1.2h-.1a1.1 1.1 0 0 1-1.1-1.1V8.2H8.9v10c0 2.5 1.9 3.8 4.2 3.8s4.2-1.3 4.2-3.8v-10z" fill="rgb(0, 43, 69)"/></svg>
<p>See how UL helps<br>your company move from<br>compliance to performance</p>
</div>
<a class="ul-button" href="#"><span>Get your free demo at ullearn.com</span></a>
</section>
</div>
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.18.2/TweenMax.min.js"></script>
<script src="dist/js/compiled.min.js"></script>
</body>
// UL Line Ad
// variables - colors
@ul-color_blue: rgb(0, 43, 69);
@ul-color_blue-light: rgb(74, 146, 226);
@ul-color_orange: rgb(239, 130, 0);
@ul-color_white: rgb(255, 255, 255);
@ul-color_orange-deep: rgb(220, 98, 0);
// base
body {
font-family: 'Open Sans', sans-serif;
}
a {
text-decoration: none;
}
p, li {
margin: 0 0 1.25em 0;
text-align: left;
font-size: 105%;
line-height: 1em;
}
section {
height: 100%;
width: 100%;
}
// classes
.square-size {
width: 298px;
height: 248px;
border: 1px solid rgb(100, 100, 100);
cursor: pointer;
}
.line-ad, .main-ad {
display: flex;
flex-flow: column;
}
.content {
display: flex;
flex-flow: column;
width: 100%;
}
#lineAd {
opacity: 0;
&.line-ad {
background-color: @ul-color_blue;
.ul-logo {
width: 12%;
height: 14%;
margin: 0.75em 0.75em 0 0;
align-self: flex-end;
}
.content {
padding: 0;
.line {
position: absolute;
width: 315px;
height: 1.4px;
top: 120px;
left: -6px;
}
p {
position: absolute;
font-size: 125%;
line-height: 1em;
color: @ul-color_white;
&#start {
color: @ul-color_blue-light;
z-index: 3;
}
&.center {
top: 111px;
left: 88px;
}
&.top {
top: 66px;
left: 24px;
}
&.bottom {
top: 138px;
left: 115px;
}
}
}
}
}
#ulMainAd {
opacity: 0;
&.main-ad {
.content {
height: 183px;
.ul-logo {
width: 30%;
height: 32%;
margin: 1.7em 0 1em 0;
align-self: center;
}
p {
font-size: 110%;
color: @ul-color_blue;
line-height: 20px;
text-align: center;
}
}
.ul-button {
font-size: 0.85rem;
color: @ul-color_white;
align-self: flex-end;
text-align: center;
padding: 1.75em 0;
background: @ul-color_orange;
transition: background-color 0.4s ease;
width: 100%;
&:hover {
background-color: @ul-color_orange-deep;
}
&:after {
content: "";
width: 2em;
height: 1em;
margin: 0.2em 0 -0.15em 0.75em;
display: inline-block;
background: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25.1 14.5'%3E%3Ctitle%3Eul_icon_right-arrow%3C/title%3E%3Cpath fill='none' stroke='%23fff' stroke-miterlimit='10' d='M24.8 7.5l-6.7 6.6M17.7.4l7.1 7.1M24.8 7.5H0'/%3E%3C/svg%3E") no-repeat;
}
}
}
}
// UL Line Ad
(function($) {
// on click of section tag, redirect to url
$('section').click(function() {
window.open('https://www.google.com');
});
var ad = $('#lineAd'),
line = ad.find('#line'),
startingP = ad.find('#start'),
firstP = ad.find('#first'),
secondP = ad.find('#second'),
thirdP = ad.find('#third'),
fourthP = ad.find('#fourth'),
fifthP = ad.find('#fifth'),
sixthP = ad.find('#sixth'),
endingP = ad.find('#end'),
mainAd = $('#ulMainAd'),
tl = new TimelineMax({repeat:-1});
tl
.to(ad, 0.5, {autoAlpha: 1, background: 'rgb(0, 43, 69)', delay: 0.5})
.to(startingP, 0.85, {x: -200, display:'none', ease:Power2.easeOut}, 2)
.fromTo(line, 1, {drawSVG: '70% 100%'},{drawSVG:'100% 0%', ease:Power2.easeOut}, 2)
.staggerFrom(firstP, 0.5, {x: 300, ease:Power4.easeIn})
.staggerFrom(secondP, 0.5, {x: 200, ease:Power4.easeIn}, 2)
.staggerTo(firstP, 0.5, {autoAlpha: 0, x: -200, display:'none', ease:Power4.easeOut, delay: 1})
.staggerTo(secondP, 0.5, {autoAlpha: 0, x: -300, display:'none', ease:Power4.easeOut})
.staggerFrom(thirdP, 0.5, {x: 300, ease:Power4.easeIn}, 4)
.staggerFrom(fourthP, 0.5, {x: 200, ease:Power4.easeIn}, 2)
.staggerTo(thirdP, 0.5, {autoAlpha: 0, x: -200, display:'none', ease:Power4.easeOut, delay: 1})
.staggerTo(fourthP, 0.5, {autoAlpha: 0, x: -300, display:'none', ease:Power4.easeOut})
.fromTo(ad, 0.5, {background: 'rgb(0, 43, 69)'},{background: 'rgb(74, 146, 226)', ease:Power2.easeIn})
.staggerFrom(fifthP, 0.5, {x: 300, ease:Power4.easeIn}, 4)
.staggerFrom(sixthP, 0.5, {x: 200, ease:Power4.easeIn}, 2)
.staggerTo(fifthP, 0.5, {autoAlpha: 0, x: -200, display:'none', ease:Power4.easeOut, delay: 1})
.staggerTo(sixthP, 0.5, {autoAlpha: 0, x: -300, display:'none', ease:Power4.easeOut})
.fromTo(ad, 0.5, {background: 'rgb(74, 146, 226)'},{background: 'rgb(239, 130, 0)', ease:Power1.easeInOut})
.to(line, 0.75, {drawSVG:"20% 0%", ease:Power2.easeOutIn}, 13)
.from(endingP, 0.65, {x: 300, ease:Power1.easeOut}, 13.15)
.to(ad, 0.75, {autoAlpha: 0, display:'none', ease:Power1.easeOut, delay: 2})
.to(mainAd, 0.5, {autoAlpha: 1, delay: 0.75})
.to(mainAd, 0.5, {autoAlpha: 0, delay: 5});
})(jQuery);
Also see: Tab Triggers