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.
<!--
* Replace the iframes src attribute to test the same effect on other websites
*
* ;)
*
-->
<div class="main">
<iframe height="3000" frameborder="0" scrolling="no" src="//www.ubuntu.com"></iframe>
</div>
<div class="blurred">
<iframe height="3000" frameborder="0" scrolling="no" src="//www.ubuntu.com"></iframe>
<p>Vague.js</p>
</div>
@import "compass/css3";
@import url(https://fonts.googleapis.com/css?family=Satisfy);
iframe{
position:absolute;
top:0;
left:0;
overflow:hidden;
width:100%;
/* fix for the stupid safari */
-webkit-transform: translate3d(0,0,0);
}
iframe.main {
position:absolute;
height:100%;
width:100%;
}
.blurred {
box-shadow: 0 5px 50px rgba(0,0,0,0.4);
overflow:hidden;
position:fixed;
bottom:-10px;
left:0;
height:200px;
width:100%;
}
.blurred p {
font-family: 'Satisfy', cursive;
position:absolute;
top:50px;
width:100%;
color:white;
text-align: center;
text-shadow:1px 1px 2px black;
font-size:70px;
}
/**
*
* Author: Gianluca Guarini
* Contact: gianluca.guarini@gmail.com
* Website: http://www.gianlucaguarini.com/
* Twitter: @gianlucaguarini
* https://gianlucaguarini.github.io/vague.js/
*
* Copyright (c) 2013 Gianluca Guarini
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
**/
var $window = $(window),
$main = $('.mainIframe');
$blurred = $('.blurred');
var vague = $blurred.find('iframe').Vague({
intensity:5 //blur intensity
});
vague.blur();
var scrollIframe = function () {
$blurred.find('iframe').css({
top: -$blurred.offset().top
});
};
$window.on('scroll',scrollIframe);
scrollIframe();
Also see: Tab Triggers