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.
<div>
<a href="https://corenominal.org/" target="_blank">
<?xml version="1.0" encoding="UTF-8"?>
<svg id="logo" width="92px" height="89px" viewBox="0 0 92 89" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Man on a rock, floating in space, waving</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="logo" fill="#141414">
<path d="M35.2566616,18.706507 C15.8258716,18.706507 0.0367434565,34.4027028 0.0367434565,53.7191391 C0.0367434565,73.0355859 15.8258716,88.7324609 35.2566616,88.7324609 C54.6874621,88.7324609 70.4765797,73.0355859 70.4765797,53.7191391 C70.4765797,34.4027028 54.6874621,18.706507 35.2566616,18.706507 L35.2566616,18.706507 Z M35.2566616,22.1808964 C52.7986391,22.1808964 66.9816219,36.2803993 66.9816219,53.7191391 C66.9816219,71.157879 52.7986391,85.2580714 35.2566616,85.2580714 C17.7146841,85.2580714 3.53171185,71.157879 3.53171185,53.7191391 C3.53171185,36.2803993 17.7146841,22.1808964 35.2566616,22.1808964 Z" id="path4138-5-7"></path>
<path d="M81.7396393,0.17143944 C76.3239616,0.17143944 71.9114286,4.55799348 71.9114286,9.94180933 C71.9114286,15.3256147 76.3239616,19.7128583 81.7396393,19.7128583 C87.1553169,19.7128583 91.5678499,15.3256147 91.5678499,9.94180933 C91.5678499,4.55799348 87.1553169,0.17143944 81.7396393,0.17143944 Z M81.7396393,2.25606474 C86.022021,2.25606474 89.4708731,5.68461974 89.4708731,9.94180933 C89.4708731,14.1989885 86.022021,17.6282226 81.7396393,17.6282226 C77.457247,17.6282226 74.0084054,14.1989885 74.0084054,9.94180933 C74.0084054,5.68461974 77.457247,2.25606474 81.7396393,2.25606474 Z" id="path4172-8-2"></path>
<polygon id="path4174-2-6" points="74.4029476 15.7641291 64.9665571 24.1026616 66.3590837 25.6607187 75.7954742 17.3221757 74.4029476 15.7641291"></polygon>
<polygon id="waving-arm" points="66.0877354 8.11120099 64.2102313 9.0396328 69.83112 20.2779685 71.7087083 19.3502053"></polygon>
<polygon id="path4174-5-6-0-2" points="71.5550889 19.463825 70.651996 21.3455648 82.0454276 26.7532643 82.9485205 24.8715245"></polygon>
<polygon id="path4174-5-6-4-6-3" points="65.4425385 23.780358 62.0753567 35.8771149 64.095981 36.433219 67.4638354 24.3365666 65.4425385 23.780358"></polygon>
<polygon id="path4174-5-6-4-3-8-3" points="66.3310965 23.2489942 54.0946347 26.3413395 54.6113724 28.3615124 66.8471406 25.2691671"></polygon>
</g>
</g>
</svg>
</a>
</div>
body {
overflow: hidden;
}
div {
min-height: 100vh;
display:flex;
justify-content:center;
align-items:center;
}
$( '#logo' ).mouseover( function()
{
var position = 1;
function wave()
{
switch( position )
{
case 1:
$( '#waving-arm' ).attr( 'points', '67.5183995 7.42467755 65.6408954 8.35310936 71.2617841 19.5914451 73.1393724 18.6636819' );
$( '#waving-arm' ).attr( 'transform', 'translate(69.390134, 13.508061) rotate(15.000000) translate(-69.390134, -13.508061) ' );
break;
case 3:
$( '#waving-arm' ).attr( 'points', '63.1360752 10.130244 61.2585711 11.0586758 66.8794598 22.2970115 68.7570481 21.3692483' );
$( '#waving-arm' ).attr( 'transform', 'translate(65.007810, 16.213628) rotate(-29.000000) translate(-65.007810, -16.213628) ' );
break;
default:
$( '#waving-arm' ).attr( 'points', '66.0877354 8.11120099 64.2102313 9.0396328 69.83112 20.2779685 71.7087083 19.3502053' );
$( '#waving-arm' ).removeAttr( 'transform' );
}
position++;
if ( position === 5 )
position = 1;
foo = setTimeout( wave, 140 );
}
wave();
});
$( '#logo' ).mouseout( function()
{
clearTimeout( foo );
});
Also see: Tab Triggers