Skip to content

Instantly share code, notes, and snippets.

@antonj
Created March 22, 2013 16:55
Show Gist options
  • Save antonj/5222922 to your computer and use it in GitHub Desktop.
Save antonj/5222922 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(window).on('keyup', function(e) {
console.log(e.keyCode);
if (e.keyCode == 49) {
console.log('addclass');
$('#wrapper').attr('class', 'desktop');
} else if (e.keyCode == 50) {
$('#wrapper').attr('class', 'Android');
}
});
</script>
<style>
*{
margin: 0;
padding: 0;
border: 0;
}
#wrapper{
margin: 0 auto;
position: relative;
-webkit-transition: all 5s ease-in-out;
}
#rbss{
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
width: 100%;
height: 100%;
}
.iPhone5{
width: 320px;
height: 568px;
}
.Android{
width: 360px;
height: 640px;
}
.tv{
width: 1920px;
height: 1080px;
}
.laptop{
width: 1440px;
height: 900px
}
.desktop{
width: 1920px;
height: 1200px;
}
</style>
</head>
<body>
<div id="wrapper" class="iPhone5">
<iframe id="rbss" src="http://www.redbullsignatureseries.com"></iframe>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment