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.
<img id="hill" src="http://7xt5iu.com1.z0.glb.clouddn.com/img/cray.png"/>
<svg width="420px" height="260px" viewBox="0 0 420 260" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g stroke="#979797" stroke-width="1" fill="none">
<path d="M370.378234,219.713623 C355.497359,218.517659 317.851562,216.86493 308.839569,181.667391 C300.756561,150.09813 323.962827,136.132362 340.939087,111.829321 C384.054688,50.1054687 340.241506,14.9992657 308.839569,11.0455325 C287.915273,8.41101084 268.693226,12.060733 251.173428,21.994699 C241.391879,25.8181821 186.979619,54.0624154 194.98203,136.364154 C198.4375,171.902344 214.222656,176.428873 221.222365,188.661808 C235.813478,214.161745 206.437808,257.5625 164.113232,241.489945 C137.276845,231.298955 115.741277,194.228837 93.7420262,176.428873 C77.3531869,163.168387 53.8934638,159.57162 34.2059335,155.533152" id="motionPath"></path>
</g>
</svg>
#hill {
position: absolute;
left: -50px;
top: -20px;
width: 100px;
}
var hill = document.getElementById('hill')
var path = MorphSVGPlugin.pathDataToBezier("#motionPath");
TweenMax.to(hill, 5, {
bezier:{
values:path,
type:"cubic",
autoRotate: 180
},
ease:Linear.easeNone,
repeat: -1
})
Also see: Tab Triggers